Skip to content

Commit 0e82907

Browse files
Update PreResetTrampoline docs
1 parent f6b4e97 commit 0e82907

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cortex-m-rt/asm.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ FpuTrampoline:
4949
.cfi_endproc
5050
.size FpuTrampoline, . - FpuTrampoline
5151

52-
# ARMv6-M leaves LR in an unknown state on Reset
53-
# this trampoline sets LR before it's pushed onto the stack by Reset
5452
.section .PreResetTrampoline, "ax"
5553
.global PreResetTrampoline
5654
# .type and .thumb_func are both required; otherwise its Thumb bit does not
5755
# get set and an invalid vector table is generated
5856
.type PreResetTrampoline,%function
5957
.thumb_func
6058
.cfi_startproc
59+
# Main entry point. This initializes RAM and invokes __pre_init, which cannot be done in Rust code
60+
# without invoking UB. It then jumps to the Rust `Reset` function.
6161
PreResetTrampoline:
6262
# set LR to the initial value used by the ARMv7-M (0xFFFF_FFFF)
6363
ldr r4,=0xffffffff

0 commit comments

Comments
 (0)