From bd237a1f96680f2cdf411ef2ca80beaa6b09cc6a Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Thu, 28 Apr 2022 10:38:25 +0200 Subject: Allow using separate page sizes for state and dfu * Less generics on bootloader. Keep PAGE_SIZE as a common multiple of DFU and ACTIVE page sizes. * Document restriction * Add unit tests for different page sizes --- examples/boot/nrf/src/bin/a.rs | 2 +- examples/boot/stm32l0/src/bin/a.rs | 2 +- examples/boot/stm32l1/src/bin/a.rs | 2 +- examples/boot/stm32l4/src/bin/a.rs | 2 +- examples/boot/stm32wl/src/bin/a.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/boot/nrf/src/bin/a.rs b/examples/boot/nrf/src/bin/a.rs index caf8140d8..2f05c817b 100644 --- a/examples/boot/nrf/src/bin/a.rs +++ b/examples/boot/nrf/src/bin/a.rs @@ -40,7 +40,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) { .unwrap(); offset += chunk.len(); } - updater.mark_update(&mut nvmc).await.unwrap(); + updater.update(&mut nvmc).await.unwrap(); led.set_high(); cortex_m::peripheral::SCB::sys_reset(); } diff --git a/examples/boot/stm32l0/src/bin/a.rs b/examples/boot/stm32l0/src/bin/a.rs index 7b9000c91..9e603a226 100644 --- a/examples/boot/stm32l0/src/bin/a.rs +++ b/examples/boot/stm32l0/src/bin/a.rs @@ -41,7 +41,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) { offset += chunk.len(); } - updater.mark_update(&mut flash).await.unwrap(); + updater.update(&mut flash).await.unwrap(); led.set_low(); Timer::after(Duration::from_secs(1)).await; cortex_m::peripheral::SCB::sys_reset(); diff --git a/examples/boot/stm32l1/src/bin/a.rs b/examples/boot/stm32l1/src/bin/a.rs index 7b9000c91..9e603a226 100644 --- a/examples/boot/stm32l1/src/bin/a.rs +++ b/examples/boot/stm32l1/src/bin/a.rs @@ -41,7 +41,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) { offset += chunk.len(); } - updater.mark_update(&mut flash).await.unwrap(); + updater.update(&mut flash).await.unwrap(); led.set_low(); Timer::after(Duration::from_secs(1)).await; cortex_m::peripheral::SCB::sys_reset(); diff --git a/examples/boot/stm32l4/src/bin/a.rs b/examples/boot/stm32l4/src/bin/a.rs index a5a9e2302..41684b2f0 100644 --- a/examples/boot/stm32l4/src/bin/a.rs +++ b/examples/boot/stm32l4/src/bin/a.rs @@ -38,7 +38,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) { .unwrap(); offset += chunk.len(); } - updater.mark_update(&mut flash).await.unwrap(); + updater.update(&mut flash).await.unwrap(); led.set_low(); cortex_m::peripheral::SCB::sys_reset(); } diff --git a/examples/boot/stm32wl/src/bin/a.rs b/examples/boot/stm32wl/src/bin/a.rs index d01a72f2d..b3e9efa75 100644 --- a/examples/boot/stm32wl/src/bin/a.rs +++ b/examples/boot/stm32wl/src/bin/a.rs @@ -40,7 +40,7 @@ async fn main(_s: embassy::executor::Spawner, p: Peripherals) { .unwrap(); offset += chunk.len(); } - updater.mark_update(&mut flash).await.unwrap(); + updater.update(&mut flash).await.unwrap(); //defmt::info!("Marked as updated"); led.set_low(); cortex_m::peripheral::SCB::sys_reset(); -- cgit