Skip to content

Commit cd82e06

Browse files
committed
docs: design: Update maximum image size when using swap-move
When using the swap-move strategy, the area allocated to the trailer no more need to have a size that is a multiple of the sector size, since the area not allocated to the trailer in the first sector holding trailer data can now be used to store firmware data. Signed-off-by: Thomas Altenbach <thomas.altenbach@legrand.com>
1 parent 1b24247 commit cd82e06

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/design.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,23 +296,19 @@ This algorithm is designed so that the higher sector of the primary slot is
296296
used only for allowing sectors to move up. Therefore the most
297297
memory-size-effective slot layout is when the primary slot is larger than
298298
the secondary slot by exactly one sector plus the size of the swap status area,
299-
rounded up to the total size of the sectors it occupies,
300299
although same-sized slots are allowed as well.
301300
The algorithm is limited to support sectors of the same
302301
sector layout. All slot's sectors should be of the same size.
303302

304303
When using this algorithm the maximum image size available for the application
305304
will be:
306305
```
307-
maximum-image-size = (N-1) * slot-sector-size - image-trailer-sectors-size
306+
maximum-image-size = (N-1) * slot-sector-size - image-trailer-size
308307
```
309308

310309
Where:
311310
`N` is the number of sectors in the primary slot.
312-
`image-trailer-sectors-size` is the size of the image trailer rounded up to
313-
the total size of sectors its occupied. For instance if the image-trailer-size
314-
is equal to 1056 B and the sector size is equal to 1024 B, then
315-
`image-trailer-sectors-size` will be equal to 2048 B.
311+
`image-trailer-size` is the size of the image trailer.
316312

317313
The algorithm does two erase cycles on the primary slot and one on the secondary
318314
slot during each swap. Assuming that receiving a new image by the DFU

0 commit comments

Comments
 (0)