]> git.sur5r.net Git - freertos/commitdiff
Accomodates wizC V14.00B and up with full optimisations.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 22 Apr 2007 10:50:03 +0000 (10:50 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 22 Apr 2007 10:50:03 +0000 (10:50 +0000)
Thanks Marcel.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@80 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/WizC/PIC18/port.c
Source/portable/WizC/PIC18/portmacro.h

index ecd71343e1b7e8f3a53a515f933afac49d4edf87..9c82529aaf5c478a8d344169cdf106e68ba096dc 100644 (file)
 */\r
 \r
 /*\r
+Changes from V4.2.1\r
+       + CallReturn Depth increased from 10 to 12 levels to accomodate wizC/fedC V14.\r
+       +CodeOptions added to disable the wizC/fedC optimiser within asm\r
+\r
 Changes from V3.2.1\r
        + CallReturn Depth increased from 8 to 10 levels to accomodate wizC/fedC V12.\r
        \r
@@ -92,7 +96,7 @@ extern volatile tskTCB * volatile pxCurrentTCB;
        #define portSTACK_CALLRETURN_ENTRY_SIZE (  2 )\r
 #endif\r
 \r
-#define portSTACK_MINIMAL_CALLRETURN_DEPTH     ( 10 )\r
+#define portSTACK_MINIMAL_CALLRETURN_DEPTH     ( 12 )\r
 #define portSTACK_OTHER_BYTES                          ( 20 )\r
 \r
 unsigned portSHORT usCalcMinStackSize          = 0;\r
@@ -121,8 +125,10 @@ unsigned portCHAR ucScratch;
         * We do this here already to avoid W-register conflicts.\r
         */\r
        _Pragma("asm")\r
+               dupmodoff\r
                movlw   OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE\r
                movwf   PRODL,ACCESS            ; PRODL is used as temp register\r
+               dupmodon\r
        _Pragma("asmend")\r
        ucScratch = PRODL;\r
 \r
@@ -214,9 +220,11 @@ unsigned portSHORT usPortCALCULATE_MINIMAL_STACK_SIZE( void )
         * Fetch the size of compiler's scratchspace.\r
         */\r
        _Pragma("asm")\r
+               dupmodoff\r
                movlw   OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE\r
                movlb   usCalcMinStackSize>>8\r
                movwf   usCalcMinStackSize,BANKED\r
+               dupmodon\r
        _Pragma("asmend")\r
 \r
        /*\r
index 86ef2585d2b8d3e8db2eb543076b21a35da0714c..04953224ea306e72be0ea584f9ec61064f5396b5 100644 (file)
@@ -209,6 +209,7 @@ extern unsigned portSHORT usCalcMinStackSize;
                portDISABLE_INTERRUPTS();                                                                       \\r
                                                                                                                                        \\r
                _Pragma("asm")                                                                                          \\r
+                       dupmodoff                                                                                               \\r
                        ;                                                                                                               \\r
                        ; Push the relevant SFR's onto the task's stack                 \\r
                        ;                                                                                                               \\r
@@ -282,6 +283,7 @@ extern unsigned portSHORT usCalcMinStackSize;
                        movff   pxCurrentTCB+1,FSR0H                                                    \\r
                        movff   FSR2L,POSTINC0                                                                  \\r
                        movff   FSR2H,POSTINC0                                                                  \\r
+                       dupmodon                                                                                                \\r
                _Pragma("asmend")                                                                                       \\r
        } while(0)\r
 \r
@@ -294,6 +296,7 @@ extern unsigned portSHORT usCalcMinStackSize;
        do                                                                                                                              \\r
        {                                                                                                                               \\r
                _Pragma("asm")                                                                                          \\r
+                       dupmodoff                                                                                               \\r
                        ;                                                                                                               \\r
                        ; Set FSR0 to point to pxCurrentTCB->pxTopOfStack.              \\r
                        ;                                                                                                               \\r
@@ -393,6 +396,7 @@ extern unsigned portSHORT usCalcMinStackSize;
                        movff   PREINC2,WREG                                                                    \\r
                        movff   PREINC2,STATUS                                                                  \\r
                        return  0               ; Return without affecting interrupts   \\r
+                       dupmodon                                                                                                \\r
                _Pragma("asmend")                                                                                       \\r
        } while(0)\r
 \r
@@ -406,7 +410,9 @@ extern void vPortYield( void );
 #define portYIELD()                            vPortYield()\r
 \r
 #define portNOP()      _Pragma("asm")                                                                  \\r
+                                               dupmodoff                                                                       \\r
                                                nop                                                                                     \\r
+                                               dupmodon                                                                        \\r
                                        _Pragma("asmend")\r
 \r
 /*-----------------------------------------------------------*/\r