summaryrefslogtreecommitdiff
path: root/examples/nrf/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nrf/run.sh')
-rwxr-xr-xexamples/nrf/run.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/nrf/run.sh b/examples/nrf/run.sh
index 20b4bc17..01c4463e 100755
--- a/examples/nrf/run.sh
+++ b/examples/nrf/run.sh
@@ -2,6 +2,8 @@
SUFFIX=$( ( sed -n 's/.*\(0x[0-9A-F]*\).*/\1/p' < memory.x;
sed -n 's/.*.*\(P[0-9_]*\).*/\1/p' src/bin/blinky.rs) | tr '\n' - )
SD_REQ=0x00
+SD_ID=$( nrfutil pkg generate --help |
+ sed -n 's/.*s140_nrf52_7.3.0|\([0-9A-Fx]*\).*/\1/p' )
cargo build --bin blinky
cp ./target/thumbv7em-none-eabi/debug/blinky \
./blinky-${SUFFIX%-}
@@ -9,11 +11,12 @@ llvm-objcopy --output-target ihex \
./target/thumbv7em-none-eabi/debug/blinky \
blinky-${SUFFIX%-}.hex
nrfutil pkg generate --hw-version 52 \
- --debug-mode --sd-req ${SD_REQ} \
+ --debug-mode --sd-req ${SD_REQ} --sd-id ${SD_ID} \
+ --softdevice s140_nrf52_7.3.0_softdevice.hex \
--application blinky-${SUFFIX%-}.hex \
- only_app-${SUFFIX%-}.zip
+ sd_plus_app-${SUFFIX%-}.zip
nrfutil pkg display \
- only_app-${SUFFIX%-}.zip
+ sd_plus_app-${SUFFIX%-}.zip
nrfutil dfu usb-serial \
-p /dev/ttyACM0 -b 115200 \
- -pkg only_app-${SUFFIX%-}.zip
+ -pkg sd_plus_app-${SUFFIX%-}.zip