]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM0/port.c
Prepare for V9.0.0 release.
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM0 / port.c
index 409a174efa21efba08ce287113129ee1298db33c..b19b969fb5e873749a769c148dda94d5bef03472 100644 (file)
@@ -184,8 +184,10 @@ __asm void prvPortStartFirstTask( void )
        isb\r
        pop {r0-r5}                             /* Pop the registers that are saved automatically. */\r
        mov lr, r5                              /* lr is now in r5. */\r
+       pop {r3}                                /* The return address is now in r3. */\r
+       pop {r2}                                /* Pop and discard the XPSR. */\r
        cpsie i                                 /* The first task has its context and interrupts can be enabled. */\r
-       pop {pc}                                /* Finally, pop the PC to jump to the user defined task code. */\r
+       bx r3                                   /* Finally, jump to the user defined task code. */\r
 \r
        ALIGN\r
 }\r