]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/ARM_CM0/port.c
Prepare for V9.0.0 release.
[freertos] / FreeRTOS / Source / portable / GCC / ARM_CM0 / port.c
index ee1a7798b39165ddf1210c08620d15e8d4b5974b..e9cf103b909f89a5cc51b516b7c6ef7cd4c63f9a 100644 (file)
@@ -186,8 +186,10 @@ void vPortStartFirstTask( void )
        "       isb                                                     \n"\r
        "       pop {r0-r5}                                     \n" /* Pop the registers that are saved automatically. */\r
        "       mov lr, r5                                      \n" /* lr is now in r5. */\r
+       "       pop {r3}                                        \n" /* Return address is now in r3. */\r
+       "       pop {r2}                                        \n" /* Pop and discard XPSR. */\r
        "       cpsie i                                         \n" /* The first task has its context and interrupts can be enabled. */\r
-       "       pop {pc}                                        \n" /* Finally, pop the PC to jump to the user defined task code. */\r
+       "       bx r3                                           \n" /* Finally, jump to the user defined task code. */\r
        "                                                               \n"\r
        "       .align 4                                        \n"\r
        "pxCurrentTCBConst2: .word pxCurrentTCB   "\r