\r
/* Constants required to set up the initial stack. */\r
#define portINITIAL_XPSR ( 0x01000000UL )\r
-#define portINITIAL_EXEC_RETURN ( 0xfffffffdUL )\r
+#define portINITIAL_EXC_RETURN ( 0xfffffffdUL )\r
#define portINITIAL_CONTROL_IF_UNPRIVILEGED ( 0x03 )\r
#define portINITIAL_CONTROL_IF_PRIVILEGED ( 0x02 )\r
\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 -= 9; /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
\r
" stmdb r0!, {r1, r4-r11, r14} \n" /* Save the remaining registers. */\r
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */\r
" \n"\r
- " stmdb sp!, {r3} \n"\r
+ " stmdb sp!, {r0, r3} \n"\r
" mov r0, %0 \n"\r
" msr basepri, r0 \n"\r
" dsb \n"\r
" bl vTaskSwitchContext \n"\r
" mov r0, #0 \n"\r
" msr basepri, r0 \n"\r
- " ldmia sp!, {r3} \n"\r
- " \n" /* Restore the context. */\r
+ " ldmia sp!, {r0, r3} \n"\r
+ " \n" /* Restore the context. */\r
" ldr r1, [r3] \n"\r
" ldr r0, [r1] \n" /* The first item in the TCB is the task top of stack. */\r
" add r1, r1, #4 \n" /* Move onto the second item in the TCB... */\r