Accomodates wizC V14.00B and up with full optimisations.

Thanks Marcel.
pull/4/head
Richard Barry 18 years ago
parent b36ba44e0d
commit 5a3272cdca

@ -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 Changes from V3.2.1
+ CallReturn Depth increased from 8 to 10 levels to accomodate wizC/fedC V12. + 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 ) #define portSTACK_CALLRETURN_ENTRY_SIZE ( 2 )
#endif #endif
#define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 10 ) #define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 12 )
#define portSTACK_OTHER_BYTES ( 20 ) #define portSTACK_OTHER_BYTES ( 20 )
unsigned portSHORT usCalcMinStackSize = 0; unsigned portSHORT usCalcMinStackSize = 0;
@ -121,8 +125,10 @@ unsigned portCHAR ucScratch;
* We do this here already to avoid W-register conflicts. * We do this here already to avoid W-register conflicts.
*/ */
_Pragma("asm") _Pragma("asm")
dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movwf PRODL,ACCESS ; PRODL is used as temp register movwf PRODL,ACCESS ; PRODL is used as temp register
dupmodon
_Pragma("asmend") _Pragma("asmend")
ucScratch = PRODL; ucScratch = PRODL;
@ -214,9 +220,11 @@ unsigned portSHORT usPortCALCULATE_MINIMAL_STACK_SIZE( void )
* Fetch the size of compiler's scratchspace. * Fetch the size of compiler's scratchspace.
*/ */
_Pragma("asm") _Pragma("asm")
dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movlb usCalcMinStackSize>>8 movlb usCalcMinStackSize>>8
movwf usCalcMinStackSize,BANKED movwf usCalcMinStackSize,BANKED
dupmodon
_Pragma("asmend") _Pragma("asmend")
/* /*

@ -209,6 +209,7 @@ extern unsigned portSHORT usCalcMinStackSize;
portDISABLE_INTERRUPTS(); \ portDISABLE_INTERRUPTS(); \
\ \
_Pragma("asm") \ _Pragma("asm") \
dupmodoff \
; \ ; \
; Push the relevant SFR's onto the task's stack \ ; Push the relevant SFR's onto the task's stack \
; \ ; \
@ -282,6 +283,7 @@ extern unsigned portSHORT usCalcMinStackSize;
movff pxCurrentTCB+1,FSR0H \ movff pxCurrentTCB+1,FSR0H \
movff FSR2L,POSTINC0 \ movff FSR2L,POSTINC0 \
movff FSR2H,POSTINC0 \ movff FSR2H,POSTINC0 \
dupmodon \
_Pragma("asmend") \ _Pragma("asmend") \
} while(0) } while(0)
@ -294,6 +296,7 @@ extern unsigned portSHORT usCalcMinStackSize;
do \ do \
{ \ { \
_Pragma("asm") \ _Pragma("asm") \
dupmodoff \
; \ ; \
; Set FSR0 to point to pxCurrentTCB->pxTopOfStack. \ ; Set FSR0 to point to pxCurrentTCB->pxTopOfStack. \
; \ ; \
@ -393,6 +396,7 @@ extern unsigned portSHORT usCalcMinStackSize;
movff PREINC2,WREG \ movff PREINC2,WREG \
movff PREINC2,STATUS \ movff PREINC2,STATUS \
return 0 ; Return without affecting interrupts \ return 0 ; Return without affecting interrupts \
dupmodon \
_Pragma("asmend") \ _Pragma("asmend") \
} while(0) } while(0)
@ -406,7 +410,9 @@ extern void vPortYield( void );
#define portYIELD() vPortYield() #define portYIELD() vPortYield()
#define portNOP() _Pragma("asm") \ #define portNOP() _Pragma("asm") \
dupmodoff \
nop \ nop \
dupmodon \
_Pragma("asmend") _Pragma("asmend")
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

Loading…
Cancel
Save