diff options
-rw-r--r-- | examples/nrf/memory.x | 4 | ||||
-rwxr-xr-x | examples/nrf/run.sh | 11 | ||||
-rw-r--r-- | examples/nrf/src/bin/blinky.rs | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/examples/nrf/memory.x b/examples/nrf/memory.x index faf1a439..ecb323e1 100644 --- a/examples/nrf/memory.x +++ b/examples/nrf/memory.x @@ -2,6 +2,6 @@ MEMORY { /* NOTE 1 K = 1 KiBi = 1024 bytes */ /* These values correspond to the NRF52840 with Softdevices S140 7.0.1 */ - FLASH : ORIGIN = 0x00001000, LENGTH = 1020K - RAM : ORIGIN = 0x20000008, LENGTH = 255K + FLASH : ORIGIN = 0x00027000, LENGTH = 868K + RAM : ORIGIN = 0x20003840, LENGTH = 242K } 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 diff --git a/examples/nrf/src/bin/blinky.rs b/examples/nrf/src/bin/blinky.rs index eb548f16..60a267e9 100644 --- a/examples/nrf/src/bin/blinky.rs +++ b/examples/nrf/src/bin/blinky.rs @@ -10,7 +10,7 @@ use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_nrf::init(Default::default()); - let mut led = Output::new(p.P1_09, Level::Low, OutputDrive::Standard); + let mut led = Output::new(p.P0_12, Level::Low, OutputDrive::Standard); loop { led.set_high(); |