Skip to content

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

Merged
merged 2 commits into from
Oct 1, 2019
Merged

Conversation

kaspar030
Copy link
Contributor

@kaspar030 kaspar030 commented Sep 25, 2019

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.

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.
@kaspar030 kaspar030 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: tools Area: Supplementary tools CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Sep 25, 2019
@kaspar030 kaspar030 requested a review from maribu September 25, 2019 08:24
@dylad dylad added this to the Release 2019.10 milestone Sep 25, 2019
@dylad dylad added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Sep 25, 2019
@dylad
Copy link
Member

dylad commented Sep 25, 2019

I am not a makefile specialist but it works. Verify is done before programming (with make flash or make flash-only)

dylad
dylad previously requested changes Sep 25, 2019
Copy link
Member

@dylad dylad left a 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.

@dylad dylad dismissed their stale review September 25, 2019 19:09

nevermind

Copy link
Contributor

@aabadie aabadie left a 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

@aabadie aabadie merged commit 49aa83e into RIOT-OS:master Oct 1, 2019
@kaspar030 kaspar030 deleted the edbg_verify_before_flash branch October 10, 2019 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Reviewed: 3-testing The PR was tested according to the maintainer guidelines Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants