aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/nrf
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2022-04-26 18:33:09 +0200
committerUlf Lilleengen <[email protected]>2022-04-27 15:17:18 +0200
commitda61611f8f57410a87106961efd24d80e6a8f63e (patch)
tree81bf5f96a052be8cc74fa4f513592adf1f4bb1db /examples/boot/nrf
parent484e0acc638c27366e19275c32db9c8487ea8fba (diff)
Add bootloader to CI
Diffstat (limited to 'examples/boot/nrf')
-rw-r--r--examples/boot/nrf/.cargo/config.toml6
-rw-r--r--examples/boot/nrf/Cargo.toml2
-rw-r--r--examples/boot/nrf/README.md8
3 files changed, 11 insertions, 5 deletions
diff --git a/examples/boot/nrf/.cargo/config.toml b/examples/boot/nrf/.cargo/config.toml
new file mode 100644
index 000000000..c75b5c539
--- /dev/null
+++ b/examples/boot/nrf/.cargo/config.toml
@@ -0,0 +1,6 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2# replace nRF82840_xxAA with your chip as listed in `probe-run --list-chips`
3runner = "probe-run --chip nRF52840_xxAA"
4
5[build]
6target = "thumbv7em-none-eabi"
diff --git a/examples/boot/nrf/Cargo.toml b/examples/boot/nrf/Cargo.toml
index 0a5bb8f9d..da8333b7c 100644
--- a/examples/boot/nrf/Cargo.toml
+++ b/examples/boot/nrf/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6 6
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] } 8embassy = { version = "0.1.0", path = "../../../embassy", features = ["nightly"] }
9embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } 9embassy-nrf = { version = "0.1.0", path = "../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly", "nrf52840"] }
10embassy-boot-nrf = { version = "0.1.0", path = "../../../embassy-boot/nrf" } 10embassy-boot-nrf = { version = "0.1.0", path = "../../../embassy-boot/nrf" }
11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" } 11embassy-traits = { version = "0.1.0", path = "../../../embassy-traits" }
12 12
diff --git a/examples/boot/nrf/README.md b/examples/boot/nrf/README.md
index b97513a9d..453df7f31 100644
--- a/examples/boot/nrf/README.md
+++ b/examples/boot/nrf/README.md
@@ -17,15 +17,15 @@ application.
17 17
18``` 18```
19# Flash bootloader 19# Flash bootloader
20cargo flash --manifest-path ../../embassy-boot/nrf/Cargo.toml --release --features embassy-nrf/nrf52840 --chip nRF52840_xxAA 20cargo flash --manifest-path ../../../embassy-boot/nrf/Cargo.toml --features embassy-nrf/nrf52840 --release --chip nRF52840_xxAA
21# Build 'b' 21# Build 'b'
22cargo build --release --features embassy-nrf/nrf52840 --bin b 22cargo build --release --bin b
23# Generate binary for 'b' 23# Generate binary for 'b'
24cargo objcopy --release --features embassy-nrf/nrf52840 --bin b -- -O binary b.bin 24cargo objcopy --release --bin b -- -O binary b.bin
25``` 25```
26 26
27# Flash `a` (which includes b.bin) 27# Flash `a` (which includes b.bin)
28 28
29``` 29```
30cargo flash --release --features embassy-nrf/nrf52840 --bin a --chip nRF52840_xxAA 30cargo flash --release --bin a --chip nRF52840_xxAA
31``` 31```