boards/pba-d-01-kw2x: rely on the common adapter selection code#12151
Merged
fjmolinas merged 1 commit intoRIOT-OS:masterfrom Sep 23, 2019
Merged
Conversation
Do not set 'OPENOCD_EXTRA_INIT' but rely on 'openocd/openocd-adapters/dap.inc.mk' to select the adapter. Using 'OPENOCD_EXTRA_INIT' for this was deprecated. When 'DEBUG_ADAPTER_ID' was set it was already the case but not with 'SERIAL'. The compatibility with using 'SERIAL' is maintained.
Contributor
|
Testing Procedure:
DEBUG_ADAPTER_ID=02000203C3194E743EE5B38C BOARD=pba-d-01-kw2x BUILD_IN_DOCKER=1 RIOT_CI_BUILD=1 make --no-print-directory -C examples/hello-world/ flashSERIAL=02000203C3194E743EE5B38C BOARD=pba-d-01-kw2x BUILD_IN_DOCKER=1 RIOT_CI_BUILD=1 make --no-print-directory -C examples/hello-world/ flash |
fjmolinas
approved these changes
Sep 23, 2019
Contributor
fjmolinas
left a comment
There was a problem hiding this comment.
I was able to reproduce the testing procedure, change make sense. ACK
Contributor
Author
|
Thank you for the review :) |
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
Do not set 'OPENOCD_EXTRA_INIT' but rely on
'openocd/openocd-adapters/dap.inc.mk' to select the adapter.
Using 'OPENOCD_EXTRA_INIT' for this was deprecated.
When 'DEBUG_ADAPTER_ID' was set it was already the case but not with 'SERIAL'.
The compatibility with using 'SERIAL' is maintained.
Review procedure
No other boards is setting
OPENOCD_EXTRA_INIT:git grep OPENOCD_EXTRA_INIT
The configuration of the adapter does end up in almost the same place with
OPENOCD_ADAPTER_INITRIOT/dist/tools/openocd/openocd.sh
Lines 353 to 355 in f74381c
And is the way we use for many other boards:
git grep '$(DEBUG_ADAPTER_ID)'
Testing procedure
Note: I will set
SERIAL_TTYfrom the command line to not trigger the usb listing when using random serial number.With this PR, the selection to
OPENOCD_ADAPTER_INITworks with bothSERIALandDEBUG_ADAPTER_ID:In master we had the same behavior with
DEBUG_ADAPTER_IDAnd when using
SERIALthis was handled throughOPENOCD_EXTRA_INITinstead ofOPENOCD_ADAPTER_INITWhen multiple boards are connected, flashing is correctly handled:
No serial configuration fails (for reference)
The SERIAL handling works
And it still works with `DEBUG_ADAPTER_ID`
Issues/PRs references
Found while reviewing #11976