We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8420e13 commit 607c9d1Copy full SHA for 607c9d1
rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h
@@ -491,15 +491,13 @@ __asm void pre_main (void)
491
LDR R1,=armcc_heap_top
492
LDR R0,[R0]
493
LDR R1,[R1]
494
- /* Save link register (keep 8 byte alignment with dummy r4) */
495
- push {r4, lr}
+ /* Save link register (keep 8 byte alignment with dummy R4) */
+ PUSH {R4, LR}
496
BL __rt_lib_init
497
- /* Restore link register and branch so when main returns it
498
- * goes to the thread destroy function.
+ BL main
+ /* Return to the thread destroy function.
499
*/
500
- pop {r4, lr}
501
- B main
502
-
+ POP {R4, PC}
503
ALIGN
504
}
505
0 commit comments