dfu: introduce progressive erasing

Patch adds option for progressive erase of firmware image.
When using this, flash is erased as necessary when receiving
new firmware, instead of erasing the whole image slot at once.
This is useful on some hardware (like nRF52840) that has
long erase times, to prevent long wait times at the beginning
of the DFU process.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
Andrzej Puzdrowski 2019-03-15 17:17:16 +01:00 committed by Anas Nashif
commit dffcfd8c79
5 changed files with 95 additions and 2 deletions

View file

@ -32,8 +32,6 @@
#define BOOT_HEADER_SIZE_V1 32
/* Trailer: */
#define BOOT_MAX_ALIGN 8
#define BOOT_MAGIC_SZ 16
#define BOOT_FLAG_SET 0x01
#define BOOT_FLAG_UNSET 0xff