-
Notifications
You must be signed in to change notification settings - Fork 795
Open
Labels
area: docsAffects the documentationAffects the documentation
Description
The mcuboot/boot/bootutil/src/bootutil_misc.c
uses the flash_area_get_sector()
function from flash map backend porting at flash_map_backend/flash_map_backend.h
. Therefore the porting attempt should also implement and expose this function. However, this is missing in the porting guide.
/* Retrieve the flash sector withing given flash area, at a given offset.
*
* @param fa flash area where the sector is taken from.
* @param off offset within flash area.
* @param sector structure of sector information.
* Returns 0 on success, -ERANGE if @p off is beyond flash area size,
* other negative errno code on failure.
*/
int flash_area_get_sector(const struct flash_area *fa,
off_t off,
struct flash_sector *sector);
It's worth mentioning that the offset specified by off
parameter and the resulting offset in sector->fs_off
are both with respect to the origin of the given flash area not the whole flash device, if I have understood it correctly.
Metadata
Metadata
Assignees
Labels
area: docsAffects the documentationAffects the documentation