mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Update the NIOSII port to enable longer jumps (#578)
Update the NIOSII port so it works on systems with more RAM as per https://forums.freertos.org/t/nios-ii-r-nios2-call26-noat-linker-error/16028
This commit is contained in:
parent
4e2bf2c639
commit
d7b712668d
|
@ -76,12 +76,12 @@ save_sp_to_pxCurrentTCB:
|
||||||
ldw et, (et) # Load the value of the pxCurrentTCB pointer
|
ldw et, (et) # Load the value of the pxCurrentTCB pointer
|
||||||
stw sp, (et) # Store the stack pointer into the top of the TCB
|
stw sp, (et) # Store the stack pointer into the top of the TCB
|
||||||
|
|
||||||
br irq_test_user # skip the section .exceptions.entry
|
br irq_test_user # skip the section .exceptions.entry
|
||||||
|
|
||||||
.section .exceptions.irqtest, "xa"
|
.section .exceptions.irqtest, "xa"
|
||||||
irq_test_user:
|
irq_test_user:
|
||||||
|
|
||||||
.section .exceptions.exit.user, "xa"
|
.section .exceptions.exit.user, "xa"
|
||||||
restore_sp_from_pxCurrentTCB:
|
restore_sp_from_pxCurrentTCB:
|
||||||
movia et, pxCurrentTCB # Load the address of the pxCurrentTCB pointer
|
movia et, pxCurrentTCB # Load the address of the pxCurrentTCB pointer
|
||||||
ldw et, (et) # Load the value of the pxCurrentTCB pointer
|
ldw et, (et) # Load the value of the pxCurrentTCB pointer
|
||||||
|
@ -120,7 +120,7 @@ restore_context:
|
||||||
ldw fp, 112(sp)
|
ldw fp, 112(sp)
|
||||||
addi sp, sp, 116 # Release stack space
|
addi sp, sp, 116 # Release stack space
|
||||||
|
|
||||||
eret # Return to address ea, loading eStatus into Status.
|
eret # Return to address ea, loading eStatus into Status.
|
||||||
|
|
||||||
.section .exceptions.soft, "xa"
|
.section .exceptions.soft, "xa"
|
||||||
soft_exceptions:
|
soft_exceptions:
|
||||||
|
@ -131,7 +131,8 @@ soft_exceptions:
|
||||||
|
|
||||||
call_scheduler:
|
call_scheduler:
|
||||||
stw ea, 72(sp) # EA is PC+4 so will skip over instruction causing exception
|
stw ea, 72(sp) # EA is PC+4 so will skip over instruction causing exception
|
||||||
call vTaskSwitchContext # Pick the next context.
|
movia r15, vTaskSwitchContext # Pick the next context - use long call version in place of "call"
|
||||||
|
callr r15
|
||||||
br restore_sp_from_pxCurrentTCB # Switch in the task context and restore.
|
br restore_sp_from_pxCurrentTCB # Switch in the task context and restore.
|
||||||
|
|
||||||
.section .exceptions.unknown.user
|
.section .exceptions.unknown.user
|
||||||
|
|
Loading…
Reference in a new issue