Skip to content

Commit

Permalink
cleaned up linking again
Browse files Browse the repository at this point in the history
  • Loading branch information
BartMassey committed Jul 25, 2024
1 parent 6c8df31 commit 9025968
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 22 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "linker=rust-lld",
"-C", "link-arg=-Tlink.x",
]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"mdbook/src/03-setup",
"mdbook/src/05-hello-world",
"mdbook/src/05-led-roulette",
"mdbook/src/07-registers",
# "mdbook/src/07-registers",
"mdbook/src/09-uart",
"mdbook/src/10-i2c",
"mdbook/src/11-led-compass",
Expand Down
2 changes: 1 addition & 1 deletion mdbook/src/03-setup/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
4 changes: 4 additions & 0 deletions mdbook/src/03-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ cortex-m-rt = "0.7.3"
panic-rtt-target = "0.1.3"
rtt-target = "0.5.0"

[dependencies.nrf52833-pac]
version = "0.12.2"
features = ["cortex-m-rt"]

[dependencies.cortex-m]
version = "0.7.7"
features = ["inline-asm", "critical-section-single-core"]
1 change: 1 addition & 0 deletions mdbook/src/03-setup/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use cortex_m::asm::wfi;
use panic_rtt_target as _;
use nrf52833_pac as _;
use rtt_target::{rprintln, rtt_init_print};

use cortex_m_rt::entry;
Expand Down
3 changes: 3 additions & 0 deletions mdbook/src/05-hello-world/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ target = "thumbv7em-none-eabihf"

[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "linker=rust-lld",
]
1 change: 0 additions & 1 deletion mdbook/src/05-led-roulette/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "linker=rust-lld",
"-C", "link-arg=-Tlink.x",
]
11 changes: 5 additions & 6 deletions mdbook/src/07-registers/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "rust-gdb -x embed.gdb"
[build]
target = "thumbv7em-none-eabihf"

[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]

[build]
target = "thumbv7em-none-eabihf"
6 changes: 0 additions & 6 deletions mdbook/src/07-registers/memory.x

This file was deleted.

1 change: 0 additions & 1 deletion mdbook/src/09-uart/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "linker=rust-lld",
"-C", "link-arg=-Tlink.x",
]
2 changes: 1 addition & 1 deletion mdbook/src/10-i2c/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
2 changes: 1 addition & 1 deletion mdbook/src/11-led-compass/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
2 changes: 1 addition & 1 deletion mdbook/src/12-punch-o-meter/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
2 changes: 1 addition & 1 deletion mdbook/src/13-snake-game/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
2 changes: 1 addition & 1 deletion mdbook/src/appendix/3-mag-calibration/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ target = "thumbv7em-none-eabihf"
[target.thumbv7em-none-eabihf]
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=rust-lld",
]
1 change: 0 additions & 1 deletion mdbook/src/serial-setup/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ target = "thumbv7em-none-eabihf"
runner = "probe-rs run --chip nRF52833_xxAA"
rustflags = [
"-C", "linker=rust-lld",
"-C", "link-arg=-Tlink.x",
]

0 comments on commit 9025968

Please sign in to comment.