Commit ba96d6e
committed
fix: size CURRENT.UF2 from the app start, not from every block written
bank_0_size is measured from DFU_BANK_0_REGION_START by the CRC check and
by serial/OTA DFU, but msc_uf2.c recorded every UF2 block written from
0x1000 (so a CURRENT.UF2 restore, which carries the SoftDevice blocks,
overcounted by the SD span) and ghostfat.c used the value as a window
from USER_FLASH_START (so after a serial DFU the dump was short by the
same span - 1.2M instead of the real 1.5M+, and a restore of that dump
only works while the tail is still in flash).
Now ghostfat adds the SoftDevice span to bank_0_size, and msc_uf2 records
the highest app address written minus the app start.
Verified on RAK4631 with 2.8.0.abd3348 (729,528 B app): after a serial
DFU the dump is 1,762,304 B (SD span + app rounded to 256), and after
restoring that dump it is byte-identical and the same size.1 parent b7b7cf4 commit ba96d6e
3 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
484 | 491 | | |
485 | 492 | | |
486 | 493 | | |
| 494 | + | |
487 | 495 | | |
488 | 496 | | |
489 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments