;\r
;/*\r
-; FreeRTOS V7.4.1 - Copyright (C) 2013 Real Time Engineers Ltd.\r
-; \r
+; FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
+; All rights reserved\r
+;\r
;\r
; ***************************************************************************\r
; * *\r
\r
.include data_model.h\r
\r
- .global vTaskIncrementTick\r
+ .global xTaskIncrementTick\r
.global vTaskSwitchContext\r
.global vPortSetupTimerInterrupt\r
.global pxCurrentTCB\r
mov_x sp, 0( r12 )\r
.endm\r
;-----------------------------------------------------------\r
- \r
+\r
portRESTORE_CONTEXT .macro\r
\r
mov_x &pxCurrentTCB, r12\r
pop_x r15\r
mov.w r15, &usCriticalNesting\r
popm_x #12, r15\r
+ nop\r
pop.w sr\r
+ nop\r
ret_x\r
.endm\r
;-----------------------------------------------------------\r
;*\r
;* If the preemptive scheduler is in use a context switch can also occur.\r
;*/\r
- \r
+\r
.text\r
.align 2\r
- \r
+\r
vPortPreemptiveTickISR: .asmfunc\r
- \r
+\r
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs\r
;to save it manually before it gets modified (interrupts get disabled).\r
push.w sr\r
portSAVE_CONTEXT\r
- \r
- call_x #vTaskIncrementTick\r
+\r
+ call_x #xTaskIncrementTick\r
call_x #vTaskSwitchContext\r
- \r
+\r
portRESTORE_CONTEXT\r
.endasmfunc\r
;-----------------------------------------------------------\r
\r
.align 2\r
- \r
+\r
vPortCooperativeTickISR: .asmfunc\r
- \r
+\r
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs\r
;to save it manually before it gets modified (interrupts get disabled).\r
push.w sr\r
portSAVE_CONTEXT\r
- \r
- call_x #vTaskIncrementTick\r
- \r
+\r
+ call_x #xTaskIncrementTick\r
+\r
portRESTORE_CONTEXT\r
- \r
+\r
.endasmfunc\r
;-----------------------------------------------------------\r
\r
\r
; The sr needs saving before it is modified.\r
push.w sr\r
- \r
+\r
; Now the SR is stacked we can disable interrupts.\r
- dint \r
+ dint\r
nop\r
- \r
+\r
; Save the context of the current task.\r
- portSAVE_CONTEXT \r
+ portSAVE_CONTEXT\r
\r
; Select the next task to run.\r
- call_x #vTaskSwitchContext \r
+ call_x #vTaskSwitchContext\r
\r
; Restore the context of the new task.\r
portRESTORE_CONTEXT\r
;\r
\r
.align 2\r
- \r
+\r
xPortStartScheduler: .asmfunc\r
\r
; Setup the hardware to generate the tick. Interrupts are disabled\r
portRESTORE_CONTEXT\r
.endasmfunc\r
;-----------------------------------------------------------\r
- \r
+\r
.end\r
- \r
+\r