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
This commit is contained in:
parent
ba46df6825
commit
bd237a1f96
10 changed files with 312 additions and 83 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue