bootutil: Add debug logging for boot status write
Adds debug level logging which shows the offset of where a
sector swap status write is occurring at
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index 8bbabbb..9a771a0 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -470,6 +470,10 @@
memset(buf, erased_val, BOOT_MAX_ALIGN);
buf[0] = bs->state;
+ BOOT_LOG_DBG("writing swap status; fa_id=%d off=0x%lx (0x%lx)",
+ flash_area_get_id(fap), (unsigned long)off,
+ (unsigned long)flash_area_get_off(fap) + off);
+
rc = flash_area_write(fap, off, buf, align);
if (rc != 0) {
rc = BOOT_EFLASH;