From: RichardBarry Date: Thu, 5 Feb 2009 21:11:24 +0000 (+0000) Subject: Add code for near memory model. X-Git-Tag: V5.1.2~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d1fc25490013ea0a28c7dce71c98346f56af7da;p=freertos Add code for near memory model. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@678 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/IAR/78K0R/port.c b/Source/portable/IAR/78K0R/port.c index a14c2e514..350ca0ff5 100644 --- a/Source/portable/IAR/78K0R/port.c +++ b/Source/portable/IAR/78K0R/port.c @@ -91,11 +91,6 @@ sequence. */ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING; /*-----------------------------------------------------------*/ -/* - * The tick interrupt handler. - */ -__interrupt void MD_INTTM05( void ); - /* * Sets up the periodic ISR used for the RTOS tick. */ @@ -145,17 +140,14 @@ unsigned long *pulLocal; } #else { - TBD - + /* Task function address is written to the stack first. As it is + written as a 32bit value a space is left on the stack for the second + two bytes. */ pxTopOfStack--; - /* Task function start address. */ - pulLocal = (unsigned long*) pxTopOfStack; - *pulLocal = (unsigned long) pxCode; - pxTopOfStack--; - - /* Initial PSW value. */ - *pxTopOfStack = portPSW; + /* Task function start address combined with the PSW. */ + pulLocal = ( unsigned long * ) pxTopOfStack; + *pulLocal = ( ( ( unsigned long ) pxCode ) | ( portPSW << 24UL ) ); pxTopOfStack--; /* The parameter is passed in AX. */