Skip to content

Commit

Permalink
Fix for erase size calculation when header is contiguous with app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juho Eskeli committed May 3, 2018
1 parent 0d2873a commit 98f9d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/active_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ bool eraseActiveFirmware(uint32_t firmwareSize)
else /* header contiguous with app */
{
/* setup erase of the header + application region */
size_needed = fw_metadata_hdr_size + firmwareSize;
size_needed = (MBED_CONF_APP_APPLICATION_START_ADDRESS - FIRMWARE_METADATA_HEADER_ADDRESS) + firmwareSize;
erase_start_addr = FIRMWARE_METADATA_HEADER_ADDRESS;
}

Expand Down

0 comments on commit 98f9d57

Please sign in to comment.