Skip to content

Commit

Permalink
suit: Do not write padding data
Browse files Browse the repository at this point in the history
Skip writing adding data to cache as it significantly affects DFU time.

Ref: NCSDK-NONE

Signed-off-by: Tomasz Chyrowicz <[email protected]>
  • Loading branch information
tomchy authored and rlubos committed Sep 24, 2024
1 parent a3d4a2f commit dfc19af
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions subsys/suit/cache/src/suit_dfu_cache_rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,9 @@ suit_plat_err_t suit_dfu_cache_rw_slot_close(struct suit_cache_slot *slot, size_

end_address += header_size;

tmp_size = 1;
for (size_t i = 0; i < padding_size; i++) {
if (write_to_sink((uint8_t *)(end_address + i), &(uint8_t){0},
tmp_size)) {
LOG_ERR("Writing padding byte failed.");
return SUIT_PLAT_ERR_IO;
}
}

/* Left padding area as-is to save time.
* It is inaccessible through the cache API.
*/
end_address += padding_size;
}

Expand Down

0 comments on commit dfc19af

Please sign in to comment.