summaryrefslogtreecommitdiff
path: root/Source/portable
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2007-04-22 10:50:03 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2007-04-22 10:50:03 +0000
commit95ae76a9c5c2a26e98fefc14be8ef6499108e054 (patch)
tree658543cc35ecee318b7cdcfd06abb4628e0a0fc0 /Source/portable
parent4a62636ce9d338820c69e6050fb9f87fb7470fdb (diff)
downloadfreertos-95ae76a9c5c2a26e98fefc14be8ef6499108e054.tar.gz
Accomodates wizC V14.00B and up with full optimisations.
Thanks Marcel. git-svn-id: http://svn.code.sf.net/p/freertos/code/trunk@80 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source/portable')
-rw-r--r--Source/portable/WizC/PIC18/port.c10
-rw-r--r--Source/portable/WizC/PIC18/portmacro.h6
2 files changed, 15 insertions, 1 deletions
diff --git a/Source/portable/WizC/PIC18/port.c b/Source/portable/WizC/PIC18/port.c
index ecd71343e..9c82529aa 100644
--- a/Source/portable/WizC/PIC18/port.c
+++ b/Source/portable/WizC/PIC18/port.c
@@ -34,6 +34,10 @@
*/
/*
+Changes from V4.2.1
+ + CallReturn Depth increased from 10 to 12 levels to accomodate wizC/fedC V14.
+ +CodeOptions added to disable the wizC/fedC optimiser within asm
+
Changes from V3.2.1
+ CallReturn Depth increased from 8 to 10 levels to accomodate wizC/fedC V12.
@@ -92,7 +96,7 @@ extern volatile tskTCB * volatile pxCurrentTCB;
#define portSTACK_CALLRETURN_ENTRY_SIZE ( 2 )
#endif
-#define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 10 )
+#define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 12 )
#define portSTACK_OTHER_BYTES ( 20 )
unsigned portSHORT usCalcMinStackSize = 0;
@@ -121,8 +125,10 @@ unsigned portCHAR ucScratch;
* We do this here already to avoid W-register conflicts.
*/
_Pragma("asm")
+ dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movwf PRODL,ACCESS ; PRODL is used as temp register
+ dupmodon
_Pragma("asmend")
ucScratch = PRODL;
@@ -214,9 +220,11 @@ unsigned portSHORT usPortCALCULATE_MINIMAL_STACK_SIZE( void )
* Fetch the size of compiler's scratchspace.
*/
_Pragma("asm")
+ dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movlb usCalcMinStackSize>>8
movwf usCalcMinStackSize,BANKED
+ dupmodon
_Pragma("asmend")
/*
diff --git a/Source/portable/WizC/PIC18/portmacro.h b/Source/portable/WizC/PIC18/portmacro.h
index 86ef2585d..04953224e 100644
--- a/Source/portable/WizC/PIC18/portmacro.h
+++ b/Source/portable/WizC/PIC18/portmacro.h
@@ -209,6 +209,7 @@ extern unsigned portSHORT usCalcMinStackSize;
portDISABLE_INTERRUPTS(); \
\
_Pragma("asm") \
+ dupmodoff \
; \
; Push the relevant SFR's onto the task's stack \
; \
@@ -282,6 +283,7 @@ extern unsigned portSHORT usCalcMinStackSize;
movff pxCurrentTCB+1,FSR0H \
movff FSR2L,POSTINC0 \
movff FSR2H,POSTINC0 \
+ dupmodon \
_Pragma("asmend") \
} while(0)
@@ -294,6 +296,7 @@ extern unsigned portSHORT usCalcMinStackSize;
do \
{ \
_Pragma("asm") \
+ dupmodoff \
; \
; Set FSR0 to point to pxCurrentTCB->pxTopOfStack. \
; \
@@ -393,6 +396,7 @@ extern unsigned portSHORT usCalcMinStackSize;
movff PREINC2,WREG \
movff PREINC2,STATUS \
return 0 ; Return without affecting interrupts \
+ dupmodon \
_Pragma("asmend") \
} while(0)
@@ -406,7 +410,9 @@ extern void vPortYield( void );
#define portYIELD() vPortYield()
#define portNOP() _Pragma("asm") \
+ dupmodoff \
nop \
+ dupmodon \
_Pragma("asmend")
/*-----------------------------------------------------------*/