freerots: fix rtos_int_exit writing outside ISR stack

rtos_int_exit would store RA at an offset of 4 byte from the SP,
where the offset should be 0.

This caused rtos_int_exit to overwrite variables in bss.
This commit is contained in:
Marius Vikhammer
2021-01-26 19:05:41 +08:00
committed by bot
parent 9a5bd86d54
commit 4374966d4e

View File

@@ -90,9 +90,9 @@ isr_skip_decrement:
/* preserve return address and schedule next task */
addi sp,sp,-4
sw ra, 0x04(sp)
sw ra, 0(sp)
call vTaskSwitchContext
lw ra, 0x04(sp)
lw ra, 0(sp)
addi sp, sp, 4
/* Clears the switch pending flag */