]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c
Correct long time mis-spelled portINITIAL_EXEC_RETURN to portINITIAL_EXC_RETURN
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM4F / port.c
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