完成rtthread适配

This commit is contained in:
2025-06-13 16:22:30 +08:00
parent 160f9f8201
commit 7c9d6440b6
7 changed files with 159 additions and 31 deletions

View File

@@ -17,7 +17,7 @@
.align 6
#else
.align 2
#endif
#endif
.global SW_handler
SW_handler:
@@ -352,3 +352,24 @@ trap_entry:
spurious_interrupt:
tail rt_hw_context_switch_exit
.globl rt_hw_do_after_save_above
.type rt_hw_do_after_save_above,@function
rt_hw_do_after_save_above:
addi sp, sp, -4
STORE ra, 0 * REGBYTES(sp)
csrr a0, mcause
csrr a1, mepc
mv a2, sp
call rt_rv32_system_irq_handler
LOAD ra, 0 * REGBYTES(sp)
addi sp, sp, 4
ret