]> git.sur5r.net Git - freertos/commitdiff
Add code for near memory model.
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 5 Feb 2009 21:11:24 +0000 (21:11 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 5 Feb 2009 21:11:24 +0000 (21:11 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@678 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/IAR/78K0R/port.c

index a14c2e5140e5daf94329942af5d01acc28393eaf..350ca0ff5a7b9bc1e2ae0f4acdff0ca4eaa669f1 100644 (file)
@@ -91,11 +91,6 @@ sequence. */
 volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING;\r
 /*-----------------------------------------------------------*/\r
 \r
-/*\r
- * The tick interrupt handler.\r
- */\r
-__interrupt void MD_INTTM05( void );\r
-\r
 /*\r
  * Sets up the periodic ISR used for the RTOS tick.\r
  */\r
@@ -145,17 +140,14 @@ unsigned long *pulLocal;
        }\r
        #else\r
        {\r
-               TBD\r
-\r
+               /* Task function address is written to the stack first.  As it is\r
+               written as a 32bit value a space is left on the stack for the second\r
+               two bytes. */\r
                pxTopOfStack--;\r
 \r
-               /* Task function start address. */\r
-               pulLocal =  (unsigned long*) pxTopOfStack;\r
-               *pulLocal = (unsigned long) pxCode;\r
-               pxTopOfStack--;\r
-\r
-               /* Initial PSW value. */\r
-               *pxTopOfStack = portPSW;\r
+               /* Task function start address combined with the PSW. */\r
+               pulLocal = ( unsigned long * ) pxTopOfStack;\r
+               *pulLocal = ( ( ( unsigned long ) pxCode ) | ( portPSW << 24UL ) );\r
                pxTopOfStack--;\r
 \r
                /* The parameter is passed in AX. */\r