* to ARM mode are contained in portISR.c.\r
*----------------------------------------------------------*/\r
\r
-/*\r
- Changes from V2.5.2\r
- \r
- + ulCriticalNesting is now saved as part of the task context, as is \r
- therefore added to the initial task stack during pxPortInitialiseStack.\r
-\r
- Changes from V3.2.2\r
-\r
- + Bug fix - The prescale value for the timer setup is now written to T0_PR \r
- instead of T0_PC. This bug would have had no effect unless a prescale \r
- value was actually used.\r
-*/\r
-\r
\r
/* Standard includes. */\r
#include <stdlib.h>\r
system mode, with interrupts enabled. */\r
*pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR;\r
\r
- #ifdef THUMB_INTERWORK\r
+ if( ( ( unsigned long ) pxCode & 0x01UL ) != 0x00 )\r
{\r
/* We want the task to start in thumb mode. */\r
*pxTopOfStack |= portTHUMB_MODE_BIT;\r
}\r
- #endif\r
\r
pxTopOfStack--;\r
\r
/* Hardware specifics. */\r
#define portSTACK_GROWTH ( -1 )\r
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) \r
-#define portBYTE_ALIGNMENT 4\r
+#define portBYTE_ALIGNMENT 8\r
#define portYIELD() asm volatile ( "SWI 0" )\r
#define portNOP() asm volatile ( "NOP" )\r
/*-----------------------------------------------------------*/ \r
PRIVILEGED_DATA static signed portCHAR *pcTraceBufferStart;\r
PRIVILEGED_DATA static signed portCHAR *pcTraceBufferEnd;\r
PRIVILEGED_DATA static signed portBASE_TYPE xTracing = pdFALSE;\r
- PRIVILEGED_DATA static unsigned portBASE_TYPE uxPreviousTask = 255;\r
+ static unsigned portBASE_TYPE uxPreviousTask = 255;\r
PRIVILEGED_DATA static portCHAR pcStatusString[ 50 ];\r
\r
#endif\r
required by the port. */\r
#if( portSTACK_GROWTH < 0 )\r
{\r
- pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 ) - ( ( usStackDepth - 1 ) % portBYTE_ALIGNMENT );\r
+ pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 );\r
+ pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned portLONG ) pxTopOfStack ) & ( ( unsigned portLONG ) ~portBYTE_ALIGNMENT_MASK ) );\r
}\r
#else\r
{\r