Skip to content

Commit

Permalink
Turn on --allow-erase-all by default.
Browse files Browse the repository at this point in the history
It causes no harm, and avoids issues when you don't set it.
  • Loading branch information
jonathanpallant committed Oct 4, 2024
1 parent f349333 commit e18284d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions exercise-book/src/nrf52-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,5 @@ Bus 002 Device 015: ID 1366:1051 <- J-Link on the nRF52840 Development Kit
✅ In the terminal run the following command from the [`nrf52-code/radio-app`](../../nrf52-code/radio-app) folder. This will build and run a simple program on the DK to test the set-up.

```console
cargo run --bin hello -- --allow-erase-all
cargo run --bin hello
```

The `-- --allow-erase-all` option gives the `--allow-erase-all` argument to `probe-rs`, which gives it permission to clear out the pre-installed Nordic bootloader code. You only need that the first time you try and program the nRF52840-DK with `cargo run`.
2 changes: 1 addition & 1 deletion nrf52-code/hal-app/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[target.thumbv7em-none-eabihf]
# set custom cargo runner to flash & run on embedded target when we call `cargo run`
# for more information, check out https://github.com/probe-rs
runner = "probe-rs run --chip nRF52840_xxAA"
runner = "probe-rs run --chip nRF52840_xxAA --allow-erase-all"
rustflags = [
"-C", "link-arg=-Tlink.x", # use the cortex-m-rt linker script
"-C", "linker=flip-link", # adds stack overflow protection
Expand Down
2 changes: 1 addition & 1 deletion nrf52-code/radio-app/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[target.thumbv7em-none-eabihf]
# set custom cargo runner to flash & run on embedded target when we call `cargo run`
# for more information, check out https://github.com/probe-rs
runner = "probe-rs run --chip nRF52840_xxAA"
runner = "probe-rs run --chip nRF52840_xxAA --allow-erase-all"
rustflags = [
"-C", "link-arg=-Tlink.x", # use the cortex-m-rt linker script
"-C", "linker=flip-link", # adds stack overflow protection
Expand Down
2 changes: 1 addition & 1 deletion nrf52-code/usb-app-solutions/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[target.thumbv7em-none-eabihf]
# set custom cargo runner to flash & run on embedded target when we call `cargo run`
# for more information, check out https://github.com/probe-rs
runner = "probe-rs run --chip nRF52840_xxAA"
runner = "probe-rs run --chip nRF52840_xxAA --allow-erase-all"
rustflags = [
"-C", "link-arg=-Tlink.x", # use the cortex-m-rt linker script
"-C", "linker=flip-link", # adds stack overflow protection
Expand Down
2 changes: 1 addition & 1 deletion nrf52-code/usb-app/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[target.thumbv7em-none-eabihf]
# set custom cargo runner to flash & run on embedded target when we call `cargo run`
# for more information, check out https://github.com/probe-rs
runner = "probe-rs run --chip nRF52840_xxAA"
runner = "probe-rs run --chip nRF52840_xxAA --allow-erase-all"
rustflags = [
"-C", "link-arg=-Tlink.x", # use the cortex-m-rt linker script
"-C", "linker=flip-link", # adds stack overflow protection
Expand Down

0 comments on commit e18284d

Please sign in to comment.