]> git.sur5r.net Git - freertos/commitdiff
Correct long time mis-spelled portINITIAL_EXEC_RETURN to portINITIAL_EXC_RETURN
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 30 May 2017 00:36:09 +0000 (00:36 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 30 May 2017 00:36:09 +0000 (00:36 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2513 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

16 files changed:
FreeRTOS/Source/portable/CCS/ARM_CM4F/port.c
FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.asm
FreeRTOS/Source/portable/GCC/ARM_CM0/port.c
FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c
FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c
FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c
FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c
FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s
FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/port.c
FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1/portasm.s
FreeRTOS/Source/portable/MikroC/ARM_CM4F/port.c
FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/port.c
FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/port.c
FreeRTOS/Source/portable/Tasking/ARM_CM4F/port.c
FreeRTOS/Source/portable/Tasking/ARM_CM4F/port_asm.asm

index 9457be19aa49c8408c8f0aecb2574e30e6fa6522..571adb3f12eb2483d9526d30463017e2e292b999 100644 (file)
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -239,7 +239,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
index 6449ae3499f3908344e47bd831575dc270f75b57..a0ca2452631391cb92813ff169f1c7d3b3d69f3b 100644 (file)
@@ -123,7 +123,7 @@ xPortPendSVHandler: .asmfunc
        ;/* Save the new top of stack into the first member of the TCB. */\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        ldr r0, ulMaxSyscallInterruptPriorityConst\r
        ldr r1, [r0]\r
        msr basepri, r1\r
@@ -132,7 +132,7 @@ xPortPendSVHandler: .asmfunc
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        ;/* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r1, [r3]\r
index cd88260d8d84c3c3a8ec8fa52fbc32c6d1efc7fc..930049e7e4d722d567a479dc97a51342e58eca97 100644 (file)
@@ -332,7 +332,7 @@ void xPortPendSVHandler( void )
        "       ldr     r3, pxCurrentTCBConst                   \n" /* Get the location of the current TCB. */\r
        "       ldr     r2, [r3]                                                \n"\r
        "                                                                               \n"\r
-       "       subs r0, r0, #32                                                \n" /* Make space for the remaining low registers. */\r
+       "       subs r0, r0, #32                                        \n" /* Make space for the remaining low registers. */\r
        "       str r0, [r2]                                            \n" /* Save the new top of stack. */\r
        "       stmia r0!, {r4-r7}                                      \n" /* Store the low registers that are not saved automatically. */\r
        "       mov r4, r8                                                      \n" /* Store the high registers. */\r
@@ -349,7 +349,7 @@ void xPortPendSVHandler( void )
        "                                                                               \n"\r
        "       ldr r1, [r2]                                            \n"\r
        "       ldr r0, [r1]                                            \n" /* The first item in pxCurrentTCB is the task top of stack. */\r
-       "       adds r0, r0, #16                                                \n" /* Move to the high registers. */\r
+       "       adds r0, r0, #16                                        \n" /* Move to the high registers. */\r
        "       ldmia r0!, {r4-r7}                                      \n" /* Pop the high registers. */\r
        "       mov r8, r4                                                      \n"\r
        "       mov r9, r5                                                      \n"\r
index 671ca71ed62e8fcb208e48cdd39ea6f54fe9c5b2..d1b0bd8ba2b6b876bed83e65f7992a0fb94f3dd9 100644 (file)
@@ -129,7 +129,7 @@ r0p1 port. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -248,7 +248,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -489,7 +489,7 @@ void xPortPendSVHandler( void )
        "       stmdb r0!, {r4-r11, r14}                        \n" /* Save the core registers. */\r
        "       str r0, [r2]                                            \n" /* Save the new top of stack into the first member of the TCB. */\r
        "                                                                               \n"\r
-       "       stmdb sp!, {r3}                                         \n"\r
+       "       stmdb sp!, {r0, r3}                                     \n"\r
        "       mov r0, %0                                                      \n"\r
        "       msr basepri, r0                                         \n"\r
        "       dsb                                                                     \n"\r
@@ -497,7 +497,7 @@ void xPortPendSVHandler( void )
        "       bl vTaskSwitchContext                           \n"\r
        "       mov r0, #0                                                      \n"\r
        "       msr basepri, r0                                         \n"\r
-       "       ldmia sp!, {r3}                                         \n"\r
+       "       ldmia sp!, {r0, r3}                                     \n"\r
        "                                                                               \n"\r
        "       ldr r1, [r3]                                            \n" /* The first item in pxCurrentTCB is the task top of stack. */\r
        "       ldr r0, [r1]                                            \n"\r
index 32943ff59828455316d19963035c077ab12f9425..5c33c737ad1e12bc8a7b86f58e23d075aabe0db9 100644 (file)
@@ -134,7 +134,7 @@ task.h is included from an application file. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                               ( 0x01000000UL )\r
-#define portINITIAL_EXEC_RETURN                                        ( 0xfffffffdUL )\r
+#define portINITIAL_EXC_RETURN                                 ( 0xfffffffdUL )\r
 #define portINITIAL_CONTROL_IF_UNPRIVILEGED            ( 0x03 )\r
 #define portINITIAL_CONTROL_IF_PRIVILEGED              ( 0x02 )\r
 \r
@@ -243,7 +243,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 9;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -514,7 +514,7 @@ void xPortPendSVHandler( void )
                "       stmdb r0!, {r1, r4-r11, r14}            \n" /* Save the remaining registers. */\r
                "       str r0, [r2]                                            \n" /* Save the new top of stack into the first member of the TCB. */\r
                "                                                                               \n"\r
-               "       stmdb sp!, {r3}                                         \n"\r
+               "       stmdb sp!, {r0, r3}                                     \n"\r
                "       mov r0, %0                                                      \n"\r
                "       msr basepri, r0                                         \n"\r
                "       dsb                                                                     \n"\r
@@ -522,8 +522,8 @@ void xPortPendSVHandler( void )
                "       bl vTaskSwitchContext                           \n"\r
                "       mov r0, #0                                                      \n"\r
                "       msr basepri, r0                                         \n"\r
-               "       ldmia sp!, {r3}                                         \n"\r
-               "                                                                               \n"     /* Restore the context. */\r
+               "       ldmia sp!, {r0, r3}                                     \n"\r
+               "                                                                               \n" /* Restore the context. */\r
                "       ldr r1, [r3]                                            \n"\r
                "       ldr r0, [r1]                                            \n" /* The first item in the TCB is the task top of stack. */\r
                "       add r1, r1, #4                                          \n" /* Move onto the second item in the TCB... */\r
index 07782685f0768f4e220e89dda90a5238fe950e4c..4cb759c39880c60ce1c7764c98c2a8cb1dd1390a 100644 (file)
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -242,7 +242,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -477,7 +477,7 @@ void xPortPendSVHandler( void )
        "       stmdb r0!, {r4-r11, r14}                        \n" /* Save the core registers. */\r
        "       str r0, [r2]                                            \n" /* Save the new top of stack into the first member of the TCB. */\r
        "                                                                               \n"\r
-       "       stmdb sp!, {r3}                                         \n"\r
+       "       stmdb sp!, {r0, r3}                                     \n"\r
        "       mov r0, %0                                                      \n"\r
        "       cpsid i                                                         \n" /* Errata workaround. */\r
        "       msr basepri, r0                                         \n"\r
@@ -487,7 +487,7 @@ void xPortPendSVHandler( void )
        "       bl vTaskSwitchContext                           \n"\r
        "       mov r0, #0                                                      \n"\r
        "       msr basepri, r0                                         \n"\r
-       "       ldmia sp!, {r3}                                         \n"\r
+       "       ldmia sp!, {r0, r3}                                     \n"\r
        "                                                                               \n"\r
        "       ldr r1, [r3]                                            \n" /* The first item in pxCurrentTCB is the task top of stack. */\r
        "       ldr r0, [r1]                                            \n"\r
index cd773cffcdb91d7eec177f4e26d2aab49d864328..67029707807f5e9b4a55d941d55c0c6f993fb99a 100644 (file)
@@ -136,7 +136,7 @@ r0p1 port. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -244,7 +244,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
index a57579d46b0cbc07be3a657512d5fea83ab298e9..e8c21e56be6edf35d64fa74e60567414cc78a2d3 100644 (file)
@@ -101,7 +101,7 @@ xPortPendSVHandler:
        /* Save the new top of stack into the first member of the TCB. */\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
        msr basepri, r0\r
        dsb\r
@@ -109,7 +109,7 @@ xPortPendSVHandler:
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        /* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r1, [r3]\r
index 7ec4084df26aa8c2eb9e189b915c806d582d03e1..f8b9fc7f3914a51baaa33aaff241bed3718ccc17 100644 (file)
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -238,7 +238,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
index 6c561e7899f805db2703ba4a042d30eb5baa1e2e..e952df8dddd2d1a1ca27caf3bdcef7e703628359 100644 (file)
@@ -101,7 +101,7 @@ xPortPendSVHandler:
        /* Save the new top of stack into the first member of the TCB. */\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
        cpsid i\r
        msr basepri, r0\r
@@ -111,7 +111,7 @@ xPortPendSVHandler:
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        /* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r1, [r3]\r
index 761806d21522bb535afe562202c2d0e2c0c3a6d8..bb4d7042316df1aa4d50f36278c3162708459cad 100644 (file)
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN                         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER                          ( 0xffffffUL )\r
@@ -257,7 +257,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -483,16 +483,16 @@ void xPortPendSVHandler( void ) iv IVT_INT_PendSV ics ICS_OFF
 \r
        str r0, [r2]                     /* Save the new top of stack into the first member of the TCB. */\r
 \r
-       stmdb sp!, (r3)\r
+       stmdb sp!, (r0, r3)\r
        ldr r0, =_ucMaxSyscallInterruptPriority\r
        ldr r1, [r0]\r
        msr basepri, r1\r
        dsb\r
-          isb\r
+       isb\r
        bl _vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldm sp!, (r3)\r
+       ldm sp!, (r0, r3)\r
 \r
        ldr r1, [r3]                     /* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r0, [r1]\r
@@ -625,13 +625,13 @@ void xPortSysTickHandler( void ) iv IVT_INT_SysTick ics ICS_AUTO
                        __asm { "cpsid i" };\r
                        __asm { "dsb" };\r
                        __asm { "isb" };\r
-                       \r
-                       /* Disable the SysTick clock without reading the \r
+\r
+                       /* Disable the SysTick clock without reading the\r
                        portNVIC_SYSTICK_CTRL_REG register to ensure the\r
-                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again, \r
-                       the time the SysTick is stopped for is accounted for as best it can \r
-                       be, but using the tickless mode will inevitably result in some tiny \r
-                       drift of the time maintained by the kernel with respect to calendar \r
+                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again,\r
+                       the time the SysTick is stopped for is accounted for as best it can\r
+                       be, but using the tickless mode will inevitably result in some tiny\r
+                       drift of the time maintained by the kernel with respect to calendar\r
                        time*/\r
                        portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );\r
 \r
index 5d33ef8f5a6ef3d6fff2ea37951be2d940317fd0..f512078651dd08acca9b48139d573fd7aff60240 100644 (file)
@@ -142,7 +142,7 @@ r0p1 port. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER          ( 0xffffffUL )\r
@@ -252,7 +252,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -503,7 +503,7 @@ __asm void xPortPendSVHandler( void )
        /* Save the new top of stack into the first member of the TCB. */\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
        msr basepri, r0\r
        dsb\r
@@ -511,7 +511,7 @@ __asm void xPortPendSVHandler( void )
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        /* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r1, [r3]\r
@@ -655,13 +655,13 @@ void xPortSysTickHandler( void )
                        __disable_irq();\r
                        __dsb( portSY_FULL_READ_WRITE );\r
                        __isb( portSY_FULL_READ_WRITE );\r
-                       \r
-                       /* Disable the SysTick clock without reading the \r
+\r
+                       /* Disable the SysTick clock without reading the\r
                        portNVIC_SYSTICK_CTRL_REG register to ensure the\r
-                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again, \r
-                       the time the SysTick is stopped for is accounted for as best it can \r
-                       be, but using the tickless mode will inevitably result in some tiny \r
-                       drift of the time maintained by the kernel with respect to calendar \r
+                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again,\r
+                       the time the SysTick is stopped for is accounted for as best it can\r
+                       be, but using the tickless mode will inevitably result in some tiny\r
+                       drift of the time maintained by the kernel with respect to calendar\r
                        time*/\r
                        portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );\r
 \r
index 6351f0ff99869d1b80796afdb47c716b49f8ca45..9ee763b55f8e35bee9af8d579a565884e474419b 100644 (file)
@@ -125,7 +125,7 @@ task.h is included from an application file. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                                               ( 0x01000000UL )\r
-#define portINITIAL_EXEC_RETURN                                        ( 0xfffffffdUL )\r
+#define portINITIAL_EXC_RETURN                                 ( 0xfffffffdUL )\r
 #define portINITIAL_CONTROL_IF_UNPRIVILEGED            ( 0x03 )\r
 #define portINITIAL_CONTROL_IF_PRIVILEGED              ( 0x02 )\r
 \r
@@ -240,7 +240,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 9;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -509,8 +509,8 @@ __asm void xPortPendSVHandler( void )
 \r
        mrs r0, psp\r
 \r
-       ldr     r3, =pxCurrentTCB                       /* Get the location of the current TCB. */\r
-       ldr     r2, [r3]\r
+       ldr r3, =pxCurrentTCB                   /* Get the location of the current TCB. */\r
+       ldr r2, [r3]\r
 \r
        tst r14, #0x10                                  /* Is the task using the FPU context?  If so, push high vfp registers. */\r
        it eq\r
@@ -520,7 +520,7 @@ __asm void xPortPendSVHandler( void )
        stmdb r0!, {r1, r4-r11, r14}    /* Save the remaining registers. */\r
        str r0, [r2]                                    /* Save the new top of stack into the first member of the TCB. */\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
        msr basepri, r0\r
        dsb\r
@@ -528,7 +528,7 @@ __asm void xPortPendSVHandler( void )
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
                                                                        /* Restore the context. */\r
        ldr r1, [r3]\r
        ldr r0, [r1]                                    /* The first item in the TCB is the task top of stack. */\r
index e3ca6f4d302b1d566f2b2a32ac1e87bbd6a8ffd7..5c5c096c260a41074b7eeefb0ccb5ccc3d62f89d 100644 (file)
@@ -136,7 +136,7 @@ is defined. */
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN         ( 0xfffffffd )\r
 \r
 /* The systick is a 24-bit counter. */\r
 #define portMAX_24_BIT_NUMBER          ( 0xffffffUL )\r
@@ -246,7 +246,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
@@ -487,7 +487,7 @@ __asm void xPortPendSVHandler( void )
        /* Save the new top of stack into the first member of the TCB. */\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
        cpsid i\r
        msr basepri, r0\r
@@ -497,7 +497,7 @@ __asm void xPortPendSVHandler( void )
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        /* The first item in pxCurrentTCB is the task top of stack. */\r
        ldr r1, [r3]\r
@@ -641,13 +641,13 @@ void xPortSysTickHandler( void )
                        __disable_irq();\r
                        __dsb( portSY_FULL_READ_WRITE );\r
                        __isb( portSY_FULL_READ_WRITE );\r
-                       \r
-                       /* Disable the SysTick clock without reading the \r
+\r
+                       /* Disable the SysTick clock without reading the\r
                        portNVIC_SYSTICK_CTRL_REG register to ensure the\r
-                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again, \r
-                       the time the SysTick is stopped for is accounted for as best it can \r
-                       be, but using the tickless mode will inevitably result in some tiny \r
-                       drift of the time maintained by the kernel with respect to calendar \r
+                       portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set.  Again,\r
+                       the time the SysTick is stopped for is accounted for as best it can\r
+                       be, but using the tickless mode will inevitably result in some tiny\r
+                       drift of the time maintained by the kernel with respect to calendar\r
                        time*/\r
                        portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );\r
 \r
index da8b634cf70fdd11cdf17adf02c0644f8adaf791..b8036523ef80d5b464098cd674ebb6ffe412f3be 100644 (file)
@@ -94,7 +94,7 @@
 \r
 /* Constants required to set up the initial stack. */\r
 #define portINITIAL_XPSR                       ( 0x01000000 )\r
-#define portINITIAL_EXEC_RETURN                ( 0xfffffffd )\r
+#define portINITIAL_EXC_RETURN         ( 0xfffffffd )\r
 \r
 /* Let the user override the pre-loading of the initial LR with the address of\r
 prvTaskExitError() in case it messes up unwinding of the stack in the\r
@@ -169,7 +169,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* A save method is being used that requires each task to maintain its\r
        own exec return value. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = portINITIAL_EXEC_RETURN;\r
+       *pxTopOfStack = portINITIAL_EXC_RETURN;\r
 \r
        pxTopOfStack -= 8;      /* R11, R10, R9, R8, R7, R6, R5 and R4. */\r
 \r
index 9678a8dd163dc9b812b990aa537f0216dd0f978c..fc0c81343310b9a90dfba2c95f5d17bd5c020248 100644 (file)
@@ -90,14 +90,14 @@ _vector_14: .type func
        ;Save the new top of stack into the first member of the TCB.\r
        str r0, [r2]\r
 \r
-       stmdb sp!, {r3}\r
+       stmdb sp!, {r0, r3}\r
        ldr.w r0, =ulMaxSyscallInterruptPriorityConst\r
        ldr r0, [r0]\r
        msr basepri, r0\r
        bl vTaskSwitchContext\r
        mov r0, #0\r
        msr basepri, r0\r
-       ldmia sp!, {r3}\r
+       ldmia sp!, {r0, r3}\r
 \r
        ;The first item in pxCurrentTCB is the task top of stack.\r
        ldr r1, [r3]\r