diff options
| author | Mathias <[email protected]> | 2023-07-01 12:17:12 +0200 |
|---|---|---|
| committer | Mathias <[email protected]> | 2023-07-03 19:33:26 +0200 |
| commit | 60b2f075dcd561cdf3ff069c1cfc5d4177c1a133 (patch) | |
| tree | b3e285258cade6618d6bb14e826fee9cf0bb284a /examples/boot/application/rp/src | |
| parent | d372df7ddb381571fd2964e32b486b6d1cd1ad03 (diff) | |
| parent | ba4344429264fa7beb99ab19c09059c2d531716d (diff) | |
Merge branch 'main' of https://github.com/embassy-rs/embassy into embassy-stm32/rcc-rtc-l4
Diffstat (limited to 'examples/boot/application/rp/src')
| -rw-r--r-- | examples/boot/application/rp/src/bin/a.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/boot/application/rp/src/bin/a.rs b/examples/boot/application/rp/src/bin/a.rs index 69850069b..c8497494c 100644 --- a/examples/boot/application/rp/src/bin/a.rs +++ b/examples/boot/application/rp/src/bin/a.rs | |||
| @@ -18,7 +18,11 @@ use panic_probe as _; | |||
| 18 | #[cfg(feature = "panic-reset")] | 18 | #[cfg(feature = "panic-reset")] |
| 19 | use panic_reset as _; | 19 | use panic_reset as _; |
| 20 | 20 | ||
| 21 | #[cfg(feature = "skip-include")] | ||
| 22 | static APP_B: &[u8] = &[0, 1, 2, 3]; | ||
| 23 | #[cfg(not(feature = "skip-include"))] | ||
| 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 24 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 25 | |||
| 22 | const FLASH_SIZE: usize = 2 * 1024 * 1024; | 26 | const FLASH_SIZE: usize = 2 * 1024 * 1024; |
| 23 | 27 | ||
| 24 | #[embassy_executor::main] | 28 | #[embassy_executor::main] |
| @@ -43,7 +47,7 @@ async fn main(_s: Spawner) { | |||
| 43 | let mut buf: AlignedBuffer<4096> = AlignedBuffer([0; 4096]); | 47 | let mut buf: AlignedBuffer<4096> = AlignedBuffer([0; 4096]); |
| 44 | defmt::info!("preparing update"); | 48 | defmt::info!("preparing update"); |
| 45 | let writer = updater | 49 | let writer = updater |
| 46 | .prepare_update() | 50 | .prepare_update(&mut buf.0[..1]) |
| 47 | .map_err(|e| defmt::warn!("E: {:?}", defmt::Debug2Format(&e))) | 51 | .map_err(|e| defmt::warn!("E: {:?}", defmt::Debug2Format(&e))) |
| 48 | .unwrap(); | 52 | .unwrap(); |
| 49 | defmt::info!("writer created, starting write"); | 53 | defmt::info!("writer created, starting write"); |
