From c6bc560c590ae63638c657cd1c42810546cfbe9c Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Fri, 3 Oct 2025 00:06:06 +0200 Subject: [PATCH] Adapt Cargo.toml, .cargo/config.toml, and memory.x to the nRF52832 --- .cargo/config.toml | 6 +++--- Cargo.toml | 4 ++-- memory.x | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8b77eac..066e628 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,11 +1,11 @@ [target.'cfg(all(target_arch = "arm", target_os = "none"))'] # replace nRF82810_xxAA with your chip as listed in `probe-rs chip list` -runner = "probe-rs run --chip nRF52810_xxAA" +runner = "probe-rs run --chip nRF52832_xxAA" [alias] rr = "run --release" -f = "flash --chip nRF52810_xxAA --reset-halt" -fr = "flash --chip nRF52810_xxAA --release --reset-halt" +f = "flash --chip nRF52832_xxAA --reset-halt" +fr = "flash --chip nRF52832_xxAA --release --reset-halt" [build] target = "thumbv7em-none-eabi" diff --git a/Cargo.toml b/Cargo.toml index 394d943..a9ee5a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ defmt = "0.3.8" defmt-rtt = "0.4.1" embassy-executor = { version = "0.6.1", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } embassy-futures = "0.1.1" -embassy-nrf = { version = "0.2.0", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } +embassy-nrf = { version = "0.2.0", features = ["defmt", "nrf52832", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } embassy-sync = { version = "0.6.0", features = ["defmt"] } embassy-time = { version = "0.3.2", features = ["defmt", "defmt-timestamp-uptime"] } embedded-storage = "0.3.1" @@ -19,7 +19,7 @@ embedded-storage-async = "0.4.1" fixed = "1.28.0" futures = { version = "0.3.31", default-features = false } heapless = "0.8.0" -nrf-softdevice = { version = "0.1.0", features = ["defmt", "ble-peripheral", "ble-gatt-server", "critical-section-impl", "nrf52810", "s112"] } +nrf-softdevice = { version = "0.1.0", features = ["defmt", "ble-peripheral", "ble-gatt-server", "critical-section-impl", "nrf52832", "s112"] } nrf-softdevice-s112 = "0.1.2" panic-probe = { version = "0.3.2", features = ["print-defmt"] } static_cell = "2.1.0" diff --git a/memory.x b/memory.x index 8db0528..6f9b940 100644 --- a/memory.x +++ b/memory.x @@ -1,8 +1,7 @@ MEMORY { /* NOTE 1 K = 1 KiB = 1024 bytes */ - /* These values correspond to the NRF52810 with SoftDevice S112 v7.x */ - FLASH : ORIGIN = 0x00000000 + 100K, LENGTH = 192K - 100K - RAM : ORIGIN = 0x20000000 + 0x24b8, LENGTH = 24K - 0x24b8 + /* These values correspond to the NRF52832 with SoftDevice S112 v7.x */ + FLASH : ORIGIN = 100K, LENGTH = 512K - 100K + RAM : ORIGIN = 0x20000000 + 30K, LENGTH = 64K - 30K } -