Skip to content

Commit 7e36bbe

Browse files
bors[bot]japaric
andcommitted
Merge #44
44: dedup contents of .cargo/config; don't depend on auto-load-safe-path being set r=ithinuel a=japaric see individual commit messages for details unfortunately this didn't come up as nice as I expected because there seems to be a bug around `target.cfg.runner` (rust-lang/cargo#5946). Still, I think this is an improvement. r? @rust-embedded/cortex-m Co-authored-by: Jorge Aparicio <[email protected]>
2 parents 3da03fc + 4265e01 commit 7e36bbe

File tree

2 files changed

+17
-35
lines changed

2 files changed

+17
-35
lines changed

.cargo/config

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[target.thumbv6m-none-eabi]
2-
runner = 'arm-none-eabi-gdb'
1+
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2+
# runner = 'arm-none-eabi-gdb -x debug.gdb'
33
rustflags = [
44
# LLD (shipped with the Rust toolchain) is used as the default linker
55
"-C", "link-arg=-Tlink.x",
@@ -16,41 +16,23 @@ rustflags = [
1616
# "-C", "link-arg=-nostartfiles",
1717
]
1818

19-
[target.thumbv7m-none-eabi]
20-
runner = 'arm-none-eabi-gdb'
21-
rustflags = [
22-
# the comments under `[target.thumbv6m-none-eabi]` also apply here
23-
"-C", "link-arg=-Tlink.x",
24-
25-
# "-C", "linker=arm-none-eabi-ld",
19+
# work around rust-lang/cargo#5946
20+
[target.thumbv6m-none-eabi]
21+
runner = 'arm-none-eabi-gdb -x debug.gdb'
2622

27-
# "-C", "linker=arm-none-eabi-gcc",
28-
# "-C", "link-arg=-Wl,-Tlink.x",
29-
# "-C", "link-arg=-nostartfiles",
30-
]
23+
[target.thumbv7m-none-eabi]
24+
runner = 'arm-none-eabi-gdb -x debug.gdb'
3125

3226
[target.thumbv7em-none-eabi]
33-
runner = 'arm-none-eabi-gdb'
34-
rustflags = [
35-
# the comments under `[target.thumbv6m-none-eabi]` also apply here
36-
"-C", "link-arg=-Tlink.x",
37-
38-
# "-C", "linker=arm-none-eabi-ld",
39-
40-
# "-C", "linker=arm-none-eabi-gcc",
41-
# "-C", "link-arg=-Wl,-Tlink.x",
42-
# "-C", "link-arg=-nostartfiles",
43-
]
27+
runner = 'arm-none-eabi-gdb -x debug.gdb'
4428

4529
[target.thumbv7em-none-eabihf]
46-
runner = 'arm-none-eabi-gdb'
47-
rustflags = [
48-
# the comments under `[target.thumbv6m-none-eabi]` also apply here
49-
"-C", "link-arg=-Tlink.x",
50-
51-
# "-C", "linker=arm-none-eabi-ld",
52-
53-
# "-C", "linker=arm-none-eabi-gcc",
54-
# "-C", "link-arg=-Wl,-Tlink.x",
55-
# "-C", "link-arg=-nostartfiles",
56-
]
30+
runner = 'arm-none-eabi-gdb -x debug.gdb'
31+
# end of workaround
32+
33+
[build]
34+
# Pick one of these compilation targets
35+
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
36+
# target = "thumbv7m-none-eabi" # Cortex-M3
37+
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
38+
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

.gdbinit renamed to debug.gdb

File renamed without changes.

0 commit comments

Comments
 (0)