]> git.sur5r.net Git - freertos/commitdiff
Allow the MSP430X IAR port layer to skip pre-loading all register values for created...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 4 Jan 2011 14:32:52 +0000 (14:32 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 4 Jan 2011 14:32:52 +0000 (14:32 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1220 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/IAR/MSP430X/port.c

index a71ee24362acfb244e1155d9ab3321d827e95407..ac89012438d12a78241fcd9058e6735faf616540 100644 (file)
@@ -137,30 +137,37 @@ unsigned long *pulTopOfStack;
        pxTopOfStack = ( portSTACK_TYPE * ) pusTopOfStack;\r
 \r
        /* Next the general purpose registers. */\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0xfffff;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0xeeeee;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0xddddd;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) pvParameters;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0xbbbbb;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0xaaaaa;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x99999;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x88888;\r
-       pxTopOfStack--; \r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x55555;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x66666;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x55555;\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) 0x44444;\r
-       pxTopOfStack--;\r
+       #ifdef PRELOAD_REGISTER_VALUES\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0xffff;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0xeeee;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0xdddd;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) pvParameters;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0xbbbb;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0xaaaa;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x9999;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x8888;\r
+               pxTopOfStack--; \r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x5555;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x6666;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x5555;\r
+               pxTopOfStack--;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) 0x4444;\r
+               pxTopOfStack--;\r
+       #else\r
+               pxTopOfStack -= 3;\r
+               *pxTopOfStack = ( portSTACK_TYPE ) pvParameters;\r
+               pxTopOfStack -= 9;\r
+       #endif\r
+\r
 \r
        /* A variable is used to keep track of the critical section nesting.\r
        This variable has to be stored as part of the task context and is\r