Commit 35e9931c authored by Jamie McCrae's avatar Jamie McCrae Committed by Jamie
Browse files

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: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent db9a7f58
Loading
Loading
Loading
Loading
+4 −0
Changes for boot/bootutil/src/loader.c: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -470,6 +470,10 @@ boot_write_status(const struct boot_loader_state *state, struct boot_status *bs)
    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;