jlink.sh: Exit with an error on failure for JLinkExe commands#11303
Merged
miri64 merged 1 commit intoRIOT-OS:masterfrom Mar 28, 2019
Merged
jlink.sh: Exit with an error on failure for JLinkExe commands#11303miri64 merged 1 commit intoRIOT-OS:masterfrom
miri64 merged 1 commit intoRIOT-OS:masterfrom
Conversation
On error Jlink exits with a no error code by default.
From the JLink User Guide:
'-ExitOnError' has the same meaning as the 'exitonerror' command
'exitonerror' command
This command toggles whether J-Link Commander exits on error or not.
1: J-Link Commander will now exit on Error.
0: J-Link Commander will no longer exit on Error.
Executing 'flash/reset' without a board connected now correctly returns an
error. For 'term' it does not show an error due to the way it is handled
internally.
It also returns an error when the board fails to do an operation when it
is in a state where it cannot be flashed for example.
19 tasks
Member
|
I can confirm that
Sadly, I don't have the hardware at hand right now to test the positive case. But will do once I have some. |
miri64
approved these changes
Mar 28, 2019
Member
miri64
left a comment
There was a problem hiding this comment.
I can also still reset and flash with an nrf52dk attached, so ACK.
Contributor
Author
|
Thank you for the review and testing :) |
Member
|
Don't delete your branch prematurely ;-D |
Contributor
Author
|
Sorry for the fail >< I need a coffe break. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
On error Jlink exits with a no error code by default.
From the JLink User Guide:
'-ExitOnError' has the same meaning as the 'exitonerror' command
Executing 'flash/reset' without a board connected now correctly returns an
error. For 'term' it does not show an error due to the way it is handled
internally.
It also returns an error when the board fails to do an operation when it
is in a state where it cannot be flashed for example.
Testing procedure without board
Without a board connected run
flashandresetfor a board using jlink, it now fails correctly:In master it was not reporting any error:
Checking
term-rtt:Term still does not return any error on failure but at least it is put in the right mode:
With this diff:
We now get a "J-Link Commander will now exit on Error" message that is not there in master.
I must be run with a BOARD using
stdio_rtt.Issues/PRs references
Split out of #10870
Confronted again while testing #9013