summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-02-05 21:11:24 +0000
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-02-05 21:11:24 +0000
commit23659b8b9bee5008014235a1ef01637bc6f69935 (patch)
treef0cbdb8b6be6dc715ab185dec139ab16a116bfb6 /Source
parent89432c472da1fe53fd749ec607fadf89c439a90a (diff)
downloadfreertos-23659b8b9bee5008014235a1ef01637bc6f69935.tar.gz
freertos-23659b8b9bee5008014235a1ef01637bc6f69935.tar.bz2
freertos-23659b8b9bee5008014235a1ef01637bc6f69935.tar.xz
Add code for near memory model.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@678 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source')
-rw-r--r--Source/portable/IAR/78K0R/port.c20
1 files changed, 6 insertions, 14 deletions
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
@@ -92,11 +92,6 @@ 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.
*/
static void prvSetupTimerInterrupt( void );
@@ -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. */