You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have ported mcuboot to STM32G4 platform. Here the internal flash has an underlying HW ECC - so when a flash dword is written with 0xFF data once it can't be re-written anymore until the entire page is deleted.
When updating an image (using mode MCUBOOT_SWAP_USING_SCRATCH) by swapping from secondary area to primary area the trailer data on primary area is not erased.
Therefore when at the end of the update process the function boot_write_swap_size is called on fap_primary_slot, the write call fails due to multiple write to flash dword.
If I flash the initial firmware in HEX format which skips initial writing 0xFF dwords it works like charm.
So I'm wondering what is the correct approach on this situation?
Should it be handled in the port specific implementation of flash_area_write / flash_area_erased_val / ...?
Or is it guaranteed mcuboot only write once to these dwords and so if they are not written during initial flashing everything is ok?
I found issues / pull requests addressing this topic like
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello community,
I have ported mcuboot to STM32G4 platform. Here the internal flash has an underlying HW ECC - so when a flash dword is written with
0xFF
data once it can't be re-written anymore until the entire page is deleted.When updating an image (using mode
MCUBOOT_SWAP_USING_SCRATCH
) by swapping from secondary area to primary area the trailer data on primary area is not erased.Therefore when at the end of the update process the function
boot_write_swap_size
is called onfap_primary_slot
, the write call fails due to multiple write to flash dword.If I flash the initial firmware in
HEX
format which skips initial writing0xFF
dwords it works like charm.So I'm wondering what is the correct approach on this situation?
Should it be handled in the port specific implementation of
flash_area_write
/flash_area_erased_val
/ ...?Or is it guaranteed mcuboot only write once to these dwords and so if they are not written during initial flashing everything is ok?
I found issues / pull requests addressing this topic like
Beta Was this translation helpful? Give feedback.
All reactions