diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-06-22 21:03:28 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-22 21:03:28 +0000 |
| commit | f7f5fe11208f4a7f1b58c8161b8e5307c90dfb80 (patch) | |
| tree | 6455f7b664328f022d2e6e242dc60baccba7082d /examples/boot | |
| parent | 2857997e3536bd1250f4ce7dcb82ded6a7b66ed9 (diff) | |
| parent | 53fd571ddb4774d103340e1442efa671a3564567 (diff) | |
Merge pull request #4325 from JYouren/patch-1
Only write to the flash what was read from the file
Diffstat (limited to 'examples/boot')
| -rw-r--r-- | examples/boot/application/rp/src/bin/a.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/boot/application/rp/src/bin/a.rs b/examples/boot/application/rp/src/bin/a.rs index ede0c07da..e6d7b3d4f 100644 --- a/examples/boot/application/rp/src/bin/a.rs +++ b/examples/boot/application/rp/src/bin/a.rs | |||
| @@ -54,7 +54,7 @@ async fn main(_s: Spawner) { | |||
| 54 | for chunk in APP_B.chunks(4096) { | 54 | for chunk in APP_B.chunks(4096) { |
| 55 | buf.0[..chunk.len()].copy_from_slice(chunk); | 55 | buf.0[..chunk.len()].copy_from_slice(chunk); |
| 56 | defmt::info!("writing block at offset {}", offset); | 56 | defmt::info!("writing block at offset {}", offset); |
| 57 | writer.write(offset, &buf.0[..]).unwrap(); | 57 | writer.write(offset, &buf.0[..chunk.len()]).unwrap(); |
| 58 | offset += chunk.len() as u32; | 58 | offset += chunk.len() as u32; |
| 59 | } | 59 | } |
| 60 | watchdog.feed(); | 60 | watchdog.feed(); |
