aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/application/rp/src
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2023-06-19 23:30:51 +0200
committerUlf Lilleengen <[email protected]>2023-06-19 23:34:07 +0200
commit161d3ce05c812f7ee951b6265735187b4994037a (patch)
treec9e82c062ac089cf37cc175810a8a2041bddea0e /examples/boot/application/rp/src
parent76659d9003104f8edd2472a36149565e4a55c0e6 (diff)
Add firmware updater examples to CI
CI was not building the a.rs application due to the requirement of b.bin having been built first. Add a feature flag to examples so that CI can build them including a dummy application. Update a.rs application examples so that they compile again.
Diffstat (limited to 'examples/boot/application/rp/src')
-rw-r--r--examples/boot/application/rp/src/bin/a.rs6
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")]
19use panic_reset as _; 19use panic_reset as _;
20 20
21#[cfg(feature = "skip-include")]
22static APP_B: &[u8] = &[0, 1, 2, 3];
23#[cfg(not(feature = "skip-include"))]
21static APP_B: &[u8] = include_bytes!("../../b.bin"); 24static APP_B: &[u8] = include_bytes!("../../b.bin");
25
22const FLASH_SIZE: usize = 2 * 1024 * 1024; 26const 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");