aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Schievink <jonasschievink@gmail.com> 2021-01-06 17:43:05 +0100
committerGravatar Jonas Schievink <jonasschievink@gmail.com> 2021-01-06 17:43:05 +0100
commit0e82907ca384d10a7fb1f2b8cc70fdb58c0b2fcf (patch)
tree2c6e827ad4e6424fbfc48ec028c3ef7518705763
parentf6b4e97ab83df2e70e2dc0c35e51394fd1f4e256 (diff)
downloadcortex-m-0e82907ca384d10a7fb1f2b8cc70fdb58c0b2fcf.tar.gz
cortex-m-0e82907ca384d10a7fb1f2b8cc70fdb58c0b2fcf.tar.zst
cortex-m-0e82907ca384d10a7fb1f2b8cc70fdb58c0b2fcf.zip
Update `PreResetTrampoline` docs
-rw-r--r--cortex-m-rt/asm.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/cortex-m-rt/asm.s b/cortex-m-rt/asm.s
index a5c340e..6cae842 100644
--- a/cortex-m-rt/asm.s
+++ b/cortex-m-rt/asm.s
@@ -49,8 +49,6 @@ FpuTrampoline:
.cfi_endproc
.size FpuTrampoline, . - FpuTrampoline
- # ARMv6-M leaves LR in an unknown state on Reset
- # this trampoline sets LR before it's pushed onto the stack by Reset
.section .PreResetTrampoline, "ax"
.global PreResetTrampoline
# .type and .thumb_func are both required; otherwise its Thumb bit does not
@@ -58,6 +56,8 @@ FpuTrampoline:
.type PreResetTrampoline,%function
.thumb_func
.cfi_startproc
+ # Main entry point. This initializes RAM and invokes __pre_init, which cannot be done in Rust code
+ # without invoking UB. It then jumps to the Rust `Reset` function.
PreResetTrampoline:
# set LR to the initial value used by the ARMv7-M (0xFFFF_FFFF)
ldr r4,=0xffffffff