Fix wolfBoot_update_trigger sector calculation #530
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wolfBoot_update_trigger
is called to initiate an update on the next boot. It does this by modifying the metadata in the last sector (selecting one of the two ifNVM_FLASH_WRITEONCE
is defined).There's a check to handle the case where the
PART_UPDATE_ENDFLAGS
isn't aligned with theWOLFBOOT_SECTOR_SIZE
. However, this check was wrong, as the modulo of these two macros is 0 when aligned, so the check should be != 0.See ticket #19133 for more information.