-
Notifications
You must be signed in to change notification settings - Fork 2k
edbg: verify before flash #12301
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
edbg: verify before flash #12301
Conversation
This commit overrides the default flash recipe with an edbg specific one. The new recipe first verifies the flashfile agains the device flash. If it is already on there, it won't get overridden. edbg takes care of resetting the device in any case.
I am not a makefile specialist but it works. Verify is done before programming (with make flash or make flash-only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a nice one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this PR, it works as expected. Code changes are good too and follows the recommendations in #11093 (comment).
I also checked and functionally the changes are the same as in #11093 except that they are more nicely handled by overriding the flash-recipe target.
ACK and go
Contribution description
This PR overrides the flash recipe edit as suggested here edit when using edbg in order to make it verify before flash. This saves a flash cycle when the contents already match.
The first commit changes all edbg short options to use the long options. If the whole diff looks scary, take a look at the individual commits. :)
Testing procedure
With an edbg supported board, try
make all; make flash-only; make flash-only
and observe that the first flashing actually programs the device, the second skips programming.Issues/PRs references
Supercedes #11093.