remove the additional line added to the MPU port.c as the original code was correct. Instead remove the alignment assert by adding #define portALIGNMENT_ASSERT_pxCurrentTCB ( void )

to the portmacor.h file.
This commit is contained in:
Richard Barry 2013-01-31 15:27:00 +00:00
parent ac78adae4b
commit b5b518571e
2 changed files with 12 additions and 10 deletions

View File

@ -223,7 +223,6 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
/* Simulate the stack frame as it would be created by a context switch
interrupt. */
pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */
pxTopOfStack--; /* Offset added to ensure 8-byte alignment is maintained. */
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
pxTopOfStack--;
*pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* PC */

View File

@ -207,6 +207,9 @@ extern void vPortExitCritical( void );
#define portNOP()
/* There are an uneven number of items on the initial stack, so
portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */
#define portALIGNMENT_ASSERT_pxCurrentTCB ( void )
#ifdef __cplusplus