File tree 1 file changed +1
-15
lines changed
1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -507,12 +507,6 @@ cfg_global_asm! {
507
507
".cfi_startproc
508
508
Reset:" ,
509
509
510
- // Ensure LR is loaded with 0xFFFF_FFFF at startup to help debuggers find the first call frame.
511
- // On ARMv6-M LR is not initialised at all, while other platforms should initialise it.
512
- "movs r4, #0
513
- mvns r4, r4
514
- mov lr, r4" ,
515
-
516
510
// If enabled, initialise the SP. This is normally initialised by the CPU itself or by a
517
511
// bootloader, but some debuggers fail to set it when resetting the target, leading to
518
512
// stack corruptions.
@@ -533,9 +527,7 @@ cfg_global_asm! {
533
527
// Run user pre-init code which must be executed immediately after startup, before the
534
528
// potentially time-consuming memory initialisation takes place.
535
529
// Example use cases include disabling default watchdogs or enabling RAM.
536
- // Reload LR after returning from pre-init (r4 is preserved by subroutines).
537
- "bl __pre_init
538
- mov lr, r4" ,
530
+ "bl __pre_init" ,
539
531
540
532
// Initialise .bss memory. `__sbss` and `__ebss` come from the linker script.
541
533
"ldr r0, =__sbss
@@ -572,12 +564,6 @@ cfg_global_asm! {
572
564
dsb
573
565
isb" ,
574
566
575
- // Push `lr` to the stack for debuggers, to prevent them unwinding past Reset.
576
- // See https://sourceware.org/binutils/docs/as/CFI-directives.html.
577
- ".cfi_def_cfa sp, 0
578
- push {{lr}}
579
- .cfi_offset lr, 0" ,
580
-
581
567
// Jump to user main function.
582
568
// `bl` is used for the extended range, but the user main function should not return,
583
569
// so trap on any unexpected return.
You can’t perform that action at this time.
0 commit comments