mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-29 22:48:37 -04:00
First task running in RISC-V-Qemu-sifive_e-FreedomStudio demo.
This commit is contained in:
parent
d0ef322b13
commit
dc99300fa9
11 changed files with 422 additions and 277 deletions
|
@ -41,13 +41,16 @@
|
|||
.global xPortStartFirstTask
|
||||
.global vPortTrapHandler
|
||||
.extern pxCurrentTCB
|
||||
.extern handle_trap
|
||||
.extern ulPortTrapHandler
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
.align 8
|
||||
xPortStartFirstTask:
|
||||
|
||||
la t0, vPortTrapHandler
|
||||
csrw mtvec, t0
|
||||
|
||||
lw sp, pxCurrentTCB /* Load pxCurrentTCB. */
|
||||
lw sp, 0( sp ) /* Read sp from first TCB member. */
|
||||
|
||||
|
@ -127,7 +130,7 @@ vPortTrapHandler:
|
|||
csrr a1, mepc
|
||||
mv a2, sp
|
||||
/*_RB_ Does stack need aligning here? */
|
||||
jal handle_trap
|
||||
jal ulPortTrapHandler
|
||||
csrw mepc, a0
|
||||
/* Save exception return address. */
|
||||
sw a0, 0( sp )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue