Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions module_flash/src/flashlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,18 +731,7 @@ int fl_startImageReplace(fl_BootImageInfo* bootImageInfo, unsigned maxsize)
return -1;
return fl_initImageWriteState(bootImageInfo->startAddress, maxsize, bootImageInfo);
}
/* This is unnecessary if we are erasing the first sector but it does no
* harm. We would need to keep additional state to avoid waiting before the
* first erase. */
fl_int_waitWhileWriting(g_flashAccess);
fl_eraseSectorAsync(fl_imageWriteState.eraseSector);
if (fl_getSectorEndAddress(fl_imageWriteState.eraseSector) < fl_imageWriteState.limitAddress) {
fl_imageWriteState.eraseSector++;
return 1;
}
/* Erasure complete. */
fl_imageWriteState.eraseSector = 0;
return 0;
return fl_startAddImageCommon();
}

#define VALIDATE
Expand Down