Commit 42c985ce authored by Dominik Ermel's avatar Dominik Ermel Committed by Andrzej Puzdrowski
Browse files

zephyr: Add MCBOOT_ERASE_PROGRESSIVELY config option



The commit adds generalized MCBOOT_ERASE_PROGRESSIVELY options
that can be used to enable progressive erase of flash in
boot_serial DFU code.
The progressive erase is used to erase flash pages as image
update fragments come, instead of erasing the whole needed
image at the beginning.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent 4f809131
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -159,6 +159,18 @@
#define MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD
#endif

/*
 * The option enables code, currently in boot_serial, that attempts
 * to erase flash progressively, as update fragments are received,
 * instead of erasing whole image size of flash area after receiving
 * first frame.
 * Enabling this options prevents stalling the beginning of transfer
 * for the time needed to erase large chunk of flash.
 */
#ifdef CONFIG_BOOT_ERASE_PROGRESSIVELY
#define MCBOOT_ERASE_PROGRESSIVELY
#endif

/*
 * Enabling this option uses newer flash map APIs. This saves RAM and
 * avoids deprecated API usage.