Skip to content

Commit

Permalink
zephyr: Use flash_area_flatten in bs_custom_storage_erase
Browse files Browse the repository at this point in the history
The intention of bs_custom_storage_erase is to remove data from device;
to support devices that do not require erase, without calling erase,
so that devices that do not implement such functions could work,
the flash_area_erase has been replaced with flash_area_flatten.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
  • Loading branch information
de-nordic committed Dec 19, 2024
1 parent e3a823c commit 19c6d12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boot/zephyr/boot_serial_extension_zephyr_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int bs_custom_storage_erase(const struct nmgr_hdr *hdr,
if (rc < 0) {
BOOT_LOG_ERR("failed to open flash area");
} else {
rc = flash_area_erase(fa, 0, flash_area_get_size(fa));
rc = flash_area_flatten(fa, 0, flash_area_get_size(fa));
if (rc < 0) {
BOOT_LOG_ERR("failed to erase flash area");
}
Expand Down

0 comments on commit 19c6d12

Please sign in to comment.