aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-boot/src/boot_loader.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/embassy-boot/src/boot_loader.rs b/embassy-boot/src/boot_loader.rs
index ca1a1b10c..a38558056 100644
--- a/embassy-boot/src/boot_loader.rs
+++ b/embassy-boot/src/boot_loader.rs
@@ -183,29 +183,29 @@ impl<ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> BootLoader<ACTIVE, DFU, S
183 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 | 183 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
184 /// |-----------|------------|--------|--------|--------|--------| 184 /// |-----------|------------|--------|--------|--------|--------|
185 /// | Active | 0 | 1 | 2 | 3 | - | 185 /// | Active | 0 | 1 | 2 | 3 | - |
186 /// | DFU | 0 | 3 | 2 | 1 | X | 186 /// | DFU | 0 | 4 | 5 | 6 | X |
187 /// 187 ///
188 /// The algorithm starts by copying 'backwards', and after the first step, the layout is 188 /// The algorithm starts by copying 'backwards', and after the first step, the layout is
189 /// as follows: 189 /// as follows:
190 /// 190 ///
191 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 | 191 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
192 /// |-----------|------------|--------|--------|--------|--------| 192 /// |-----------|------------|--------|--------|--------|--------|
193 /// | Active | 1 | 1 | 2 | 1 | - | 193 /// | Active | 1 | 1 | 2 | 6 | - |
194 /// | DFU | 1 | 3 | 2 | 1 | 3 | 194 /// | DFU | 1 | 4 | 5 | 6 | 3 |
195 /// 195 ///
196 /// The next iteration performs the same steps 196 /// The next iteration performs the same steps
197 /// 197 ///
198 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 | 198 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
199 /// |-----------|------------|--------|--------|--------|--------| 199 /// |-----------|------------|--------|--------|--------|--------|
200 /// | Active | 2 | 1 | 2 | 1 | - | 200 /// | Active | 2 | 1 | 5 | 6 | - |
201 /// | DFU | 2 | 3 | 2 | 2 | 3 | 201 /// | DFU | 2 | 4 | 5 | 2 | 3 |
202 /// 202 ///
203 /// And again until we're done 203 /// And again until we're done
204 /// 204 ///
205 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 | 205 /// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
206 /// |-----------|------------|--------|--------|--------|--------| 206 /// |-----------|------------|--------|--------|--------|--------|
207 /// | Active | 3 | 3 | 2 | 1 | - | 207 /// | Active | 3 | 4 | 5 | 6 | - |
208 /// | DFU | 3 | 3 | 1 | 2 | 3 | 208 /// | DFU | 3 | 4 | 1 | 2 | 3 |
209 /// 209 ///
210 /// ## REVERTING 210 /// ## REVERTING
211 /// 211 ///
@@ -220,19 +220,19 @@ impl<ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> BootLoader<ACTIVE, DFU, S
220 /// 220 ///
221 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 | 221 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
222 /// |-----------|--------------|--------|--------|--------|--------| 222 /// |-----------|--------------|--------|--------|--------|--------|
223 /// | Active | 3 | 1 | 2 | 1 | - | 223 /// | Active | 3 | 1 | 5 | 6 | - |
224 /// | DFU | 3 | 3 | 1 | 2 | 3 | 224 /// | DFU | 3 | 4 | 1 | 2 | 3 |
225 /// 225 ///
226 /// 226 ///
227 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 | 227 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
228 /// |-----------|--------------|--------|--------|--------|--------| 228 /// |-----------|--------------|--------|--------|--------|--------|
229 /// | Active | 3 | 1 | 2 | 1 | - | 229 /// | Active | 3 | 1 | 2 | 6 | - |
230 /// | DFU | 3 | 3 | 2 | 2 | 3 | 230 /// | DFU | 3 | 4 | 5 | 2 | 3 |
231 /// 231 ///
232 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 | 232 /// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
233 /// |-----------|--------------|--------|--------|--------|--------| 233 /// |-----------|--------------|--------|--------|--------|--------|
234 /// | Active | 3 | 1 | 2 | 3 | - | 234 /// | Active | 3 | 1 | 2 | 3 | - |
235 /// | DFU | 3 | 3 | 2 | 1 | 3 | 235 /// | DFU | 3 | 4 | 5 | 6 | 3 |
236 /// 236 ///
237 pub fn prepare_boot(&mut self, aligned_buf: &mut [u8]) -> Result<State, BootError> { 237 pub fn prepare_boot(&mut self, aligned_buf: &mut [u8]) -> Result<State, BootError> {
238 // Ensure we have enough progress pages to store copy progress 238 // Ensure we have enough progress pages to store copy progress