\r
/* Constants required to set up the initial stack. */\r
#define portINITIAL_XPSR ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN ( 0xfffffffd )\r
\r
/* The systick is a 24-bit counter. */\r
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )\r
/* A save method is being used that requires each task to maintain its\r
own exec return value. */\r
pxTopOfStack--;\r
- *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+ *pxTopOfStack = portINITIAL_EXC_RETURN;\r
\r
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
\r
/* Save the new top of stack into the first member of the TCB. */\r
str r0, [r2]\r
\r
- stmdb sp!, {r3}\r
+ stmdb sp!, {r0, r3}\r
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
msr basepri, r0\r
dsb\r
bl vTaskSwitchContext\r
mov r0, #0\r
msr basepri, r0\r
- ldmia sp!, {r3}\r
+ ldmia sp!, {r0, r3}\r
\r
/* The first item in pxCurrentTCB is the task top of stack. */\r
ldr r1, [r3]\r
__disable_irq();\r
__dsb( portSY_FULL_READ_WRITE );\r
__isb( portSY_FULL_READ_WRITE );\r
- \r
- /* Disable the SysTick clock without reading the \r
+\r
+ /* Disable the SysTick clock without reading the\r
portNVIC_SYSTICK_CTRL_REG register to ensure the\r
- portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again, \r
- the time the SysTick is stopped for is accounted for as best it can \r
- be, but using the tickless mode will inevitably result in some tiny \r
- drift of the time maintained by the kernel with respect to calendar \r
+ portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,\r
+ the time the SysTick is stopped for is accounted for as best it can\r
+ be, but using the tickless mode will inevitably result in some tiny\r
+ drift of the time maintained by the kernel with respect to calendar\r
time*/\r
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );\r
\r