Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating fl_startImageReplace() to use fl_startAddImageCommon() #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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