\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
\r
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */\r
\r
- stmdb sp!, (r3)\r
+ stmdb sp!, (r0, r3)\r
ldr r0, =_ucMaxSyscallInterruptPriority\r
ldr r1, [r0]\r
msr basepri, r1\r
dsb\r
- isb\r
+ isb\r
bl _vTaskSwitchContext\r
mov r0, #0\r
msr basepri, r0\r
- ldm sp!, (r3)\r
+ ldm sp!, (r0, r3)\r
\r
ldr r1, [r3] /* The first item in pxCurrentTCB is the task top of stack. */\r
ldr r0, [r1]\r
__asm { "cpsid i" };\r
__asm { "dsb" };\r
__asm { "isb" };\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