Skip to content

Commit 9025968

Browse files
committed
cleaned up linking again
1 parent 6c8df31 commit 9025968

File tree

16 files changed

+21
-22
lines changed

16 files changed

+21
-22
lines changed

.cargo/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7+
"-C", "linker=rust-lld",
78
"-C", "link-arg=-Tlink.x",
89
]

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [
44
"mdbook/src/03-setup",
55
"mdbook/src/05-hello-world",
66
"mdbook/src/05-led-roulette",
7-
"mdbook/src/07-registers",
7+
# "mdbook/src/07-registers",
88
"mdbook/src/09-uart",
99
"mdbook/src/10-i2c",
1010
"mdbook/src/11-led-compass",

mdbook/src/03-setup/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/03-setup/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ cortex-m-rt = "0.7.3"
99
panic-rtt-target = "0.1.3"
1010
rtt-target = "0.5.0"
1111

12+
[dependencies.nrf52833-pac]
13+
version = "0.12.2"
14+
features = ["cortex-m-rt"]
15+
1216
[dependencies.cortex-m]
1317
version = "0.7.7"
1418
features = ["inline-asm", "critical-section-single-core"]

mdbook/src/03-setup/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use cortex_m::asm::wfi;
55
use panic_rtt_target as _;
6+
use nrf52833_pac as _;
67
use rtt_target::{rprintln, rtt_init_print};
78

89
use cortex_m_rt::entry;

mdbook/src/05-hello-world/.cargo/config.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ target = "thumbv7em-none-eabihf"
33

44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
6+
rustflags = [
7+
"-C", "linker=rust-lld",
8+
]

mdbook/src/05-led-roulette/.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
77
"-C", "linker=rust-lld",
8-
"-C", "link-arg=-Tlink.x",
98
]
+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2-
runner = "rust-gdb -x embed.gdb"
1+
[build]
2+
target = "thumbv7em-none-eabihf"
33

4+
[target.thumbv7em-none-eabihf]
5+
runner = "probe-rs run --chip nRF52833_xxAA"
46
rustflags = [
5-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
68
]
7-
8-
[build]
9-
target = "thumbv7em-none-eabihf"

mdbook/src/07-registers/memory.x

-6
This file was deleted.

mdbook/src/09-uart/.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
77
"-C", "linker=rust-lld",
8-
"-C", "link-arg=-Tlink.x",
98
]

mdbook/src/10-i2c/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/11-led-compass/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/12-punch-o-meter/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/13-snake-game/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/appendix/3-mag-calibration/.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
44
[target.thumbv7em-none-eabihf]
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
7-
"-C", "link-arg=-Tlink.x",
7+
"-C", "linker=rust-lld",
88
]

mdbook/src/serial-setup/.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
55
runner = "probe-rs run --chip nRF52833_xxAA"
66
rustflags = [
77
"-C", "linker=rust-lld",
8-
"-C", "link-arg=-Tlink.x",
98
]

0 commit comments

Comments
 (0)