summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-04-13 18:53:10 +0200
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-04-13 18:53:10 +0200
commit781c150c553531f94db40c02d70c0a079893b15b (patch)
treedc39aa822e2832a4f922703c20e2a6739fe37d8e
parent1d0037149e63ff2583aa384276c27dcb71aab6b6 (diff)
downloadfreertos-781c150c553531f94db40c02d70c0a079893b15b.tar.gz
freertos-781c150c553531f94db40c02d70c0a079893b15b.tar.bz2
freertos-781c150c553531f94db40c02d70c0a079893b15b.tar.xz
PIC18_SDCC: Add 1 byte for tasks function parameters
This patch adds 1 byte, in order to hold tasks functions parameters, in tasks stack. We use 3 bytes, because SDCC uses 3 bytes for generic pointers. signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r--Source/portable/SDCC/PIC18/port.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/portable/SDCC/PIC18/port.c b/Source/portable/SDCC/PIC18/port.c
index 6abaa737..27914e90 100644
--- a/Source/portable/SDCC/PIC18/port.c
+++ b/Source/portable/SDCC/PIC18/port.c
@@ -78,7 +78,7 @@ static void prvSetupTimerInterrupt(void);
* The configuration of timer0 done in prvSetupTimerInterrupt,implies the bellow relation
* between configTICK_RATE_HZ and TMR0ReloadValue.
*/
-const unsigned portSHORT TMR0ReloadValue=(65536 - configCPU_CLOCK_HZ/(configTICK_RATE_HZ*portTIMER_FOSC_SCALE));
+const static unsigned portSHORT TMR0ReloadValue=(65536 - configCPU_CLOCK_HZ/(configTICK_RATE_HZ*portTIMER_FOSC_SCALE));
/*
* ISR placed on the high priority vector.
@@ -103,6 +103,9 @@ portSTACK_TYPE *pxPortInitialiseStack(portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
ulAddress >>= 8;
*pxTopOfStack = (portSTACK_TYPE) (ulAddress & (unsigned portLONG)0x00ff);
pxTopOfStack--;
+ ulAddress >>= 8;
+ *pxTopOfStack = (portSTACK_TYPE) (ulAddress & (unsigned portLONG)0x00ff);
+ pxTopOfStack--;
/*Now we save hardware and compiler registers*/
*pxTopOfStack = (portSTACK_TYPE)0x00; /* WREG. */