From 23659b8b9bee5008014235a1ef01637bc6f69935 Mon Sep 17 00:00:00 2001 From: RichardBarry Date: Thu, 5 Feb 2009 21:11:24 +0000 Subject: Add code for near memory model. git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@678 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/IAR/78K0R/port.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'Source') diff --git a/Source/portable/IAR/78K0R/port.c b/Source/portable/IAR/78K0R/port.c index a14c2e51..350ca0ff 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. */ -- cgit v1.2.3