Skip to content

Commit 51246fa

Browse files
de-nordicrghaddab
authored andcommitted
[nrf fromtree] fs/fcb: Replace flash_area_erase with flash_area_flatten
FCB depends on explicit erase characteristics of a device. Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit 64ccfb0)
1 parent 8ffc833 commit 51246fa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

subsys/fs/fcb/fcb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ fcb_erase_sector(const struct fcb *fcb, const struct flash_sector *sector)
8282
return -EIO;
8383
}
8484

85-
rc = flash_area_erase(fcb->fap, sector->fs_off, sector->fs_size);
86-
85+
rc = flash_area_flatten(fcb->fap, sector->fs_off, sector->fs_size);
8786
if (rc != 0) {
8887
return -EIO;
8988
}

tests/subsys/fs/fcb/testcase.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ tests:
1212
tags: flash_circural_buffer
1313
integration_platforms:
1414
- nrf52840dk/nrf52840
15+
filesystem.fcb.no_erase:
16+
platform_allow:
17+
- nrf54l15pdk/nrf54l15/cpuapp
18+
filesystem.fcb.native_sim.no_erase:
19+
extra_args: CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=n
20+
platform_allow: native_sim
1521
filesystem.fcb.native_sim.fcb_0x00:
1622
extra_args: DTC_OVERLAY_FILE=boards/native_sim_ev_0x00.overlay
1723
platform_allow: native_sim

0 commit comments

Comments
 (0)