Skip to content

Commit 0cd40f7

Browse files
david-hazi-armtomi-font
authored andcommitted
mcuboot: Fix SWAP_USING_MOVE FWU method
Added missing flash_area_get_sector function, which is required by mcuboot. Signed-off-by: Dávid Házi <[email protected]> Change-Id: I6e7e4dfc68a5c7fd35c3286085c92189e956b1e0 (cherry picked from commit e5b6cd3) Signed-off-by: Dominik Ermel <[email protected]>
1 parent 918f32d commit 0cd40f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bl2/ext/mcuboot/flash_map_extended.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,13 @@ int flash_area_read_is_empty(const struct flash_area *fa, uint32_t off,
100100

101101
return 1;
102102
}
103+
104+
int flash_area_get_sector(const struct flash_area *fa, uint32_t off,
105+
struct flash_sector *sector)
106+
{
107+
sector->fs_off = (off / DRV_FLASH_AREA(fa)->GetInfo()->sector_size) *
108+
DRV_FLASH_AREA(fa)->GetInfo()->sector_size;
109+
sector->fs_size = DRV_FLASH_AREA(fa)->GetInfo()->sector_size;
110+
111+
return 0;
112+
}

0 commit comments

Comments
 (0)