Skip to content

Commit 8047986

Browse files
authored
Add --nmagic linker arg, for unaligned flash origin support.
Without this, the linker places some extra program header entries that can confuse flashing tools. Many thanks to @jonas-schievink for pointing me to this flag in Matrix.
1 parent ae6ad14 commit 8047986

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.cargo/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
# runner = "gdb -q -x openocd.gdb"
1111

1212
rustflags = [
13+
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
14+
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
15+
"-C", "link-arg=--nmagic",
16+
1317
# LLD (shipped with the Rust toolchain) is used as the default linker
1418
"-C", "link-arg=-Tlink.x",
1519

0 commit comments

Comments
 (0)