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