\r
/* Offset added to account for the way the MCU uses the stack on entry/exit\r
of interrupts, and to ensure alignment. */\r
- pxTopOfStack -= 2;\r
+ pxTopOfStack--;\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */\r
*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */\r
\r
- /* A save method is being used that requiers each task to maintain its\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
RSEG CODE:CODE(2)\r
thumb\r
\r
- EXTERN vPortYieldFromISR\r
EXTERN pxCurrentTCB\r
EXTERN vTaskSwitchContext\r
\r
- PUBLIC vSetMSP\r
PUBLIC xPortPendSVHandler\r
PUBLIC vPortSetInterruptMask\r
PUBLIC vPortClearInterruptMask\r
PUBLIC vPortStartFirstTask\r
PUBLIC vPortEnableVFP\r
\r
-/*-----------------------------------------------------------*/\r
\r
-vSetMSP\r
- msr msp, r0\r
- bx lr\r
- \r
/*-----------------------------------------------------------*/\r
\r
xPortPendSVHandler:\r
\r
/*-----------------------------------------------------------*/\r
\r
-vPortSVCHandler;\r
+vPortSVCHandler:\r
/* Get the location of the current TCB. */\r
ldr r3, =pxCurrentTCB\r
ldr r1, [r3]\r
\r
/*-----------------------------------------------------------*/\r
\r
-vPortStartFirstTask\r
+vPortStartFirstTask:\r
/* Use the NVIC offset register to locate the stack. */\r
ldr r0, =0xE000ED08\r
ldr r0, [r0]\r
\r
/*-----------------------------------------------------------*/\r
\r
-vPortEnableVFP\r
+vPortEnableVFP:\r
/* The FPU enable bits are in the CPACR. */\r
ldr.w r0, =0xE000ED88\r
ldr r1, [r0]\r
#define portSET_INTERRUPT_MASK_FROM_ISR() 0;vPortSetInterruptMask()\r
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask();(void)x\r
\r
+/* There are an uneven number of items on the initial stack, so \r
+portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */\r
+#define portALIGNMENT_ASSERT_pxCurrentTCB ( void )\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Task function macros as described on the FreeRTOS.org WEB site. */\r