makefiles/tools/openocd: Do not require openocd.cfg for STM32 boards#21717
Merged
maribu merged 1 commit intoRIOT-OS:masterfrom Sep 15, 2025
Merged
makefiles/tools/openocd: Do not require openocd.cfg for STM32 boards#21717maribu merged 1 commit intoRIOT-OS:masterfrom
maribu merged 1 commit intoRIOT-OS:masterfrom
Conversation
crasbe
reviewed
Sep 14, 2025
1d08960 to
6a176bf
Compare
crasbe
reviewed
Sep 15, 2025
7ac0365 to
1c6fb2d
Compare
crasbe
reviewed
Sep 15, 2025
When `OPENOCD_DEBUG_ADAPTER` was set to `stlink`, no `openocd.cfg` was needed for most STM32 boards. (But one could still be provided if special handling was needed.) However, for any other debug adapter this was not the case. This moves the handling for when no custom `openocd.cfg` is provided from the `stlink.inc.mk` to `openocd.inc.mk`, so that most boards now work out of the box with other debuggers. Co-authored-by: crasbe <[email protected]>
1c6fb2d to
a1e13af
Compare
crasbe
approved these changes
Sep 15, 2025
Contributor
crasbe
left a comment
There was a problem hiding this comment.
I did not test it myself, so I trust your testing.
Member
Author
|
Flashing still works fine on a Nucleo-F446RE :) |
Member
Author
|
Thx :) |
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
When
OPENOCD_DEBUG_ADAPTERwas set tostlink, noopenocd.cfgwas needed for most STM32 boards. (But one could still be provided if special handling was needed.) However, for any other debug adapter this was not the case.This moves the handling for when no custom
openocd.cfgis provided from thestlink.inc.mktoopenocd.inc.mk, so that most boards now work out of the box with other debuggers.Testing procedure
Tested with
OPENOCD_DEBUG_ADAPTER=jlinkwith a yet to be upstreamed STM32 board. BIssues/PRs references
Fixes one of the issues we ran into on the RIOT summit Hackathon when adding the Olimexino-STM32F3 board definition