sam0: allow flashing with JLinkExe#11725
Conversation
Currently sam0 will always use OpenOCD, even when the JLink programmer is selected. Instead, use JLinkExe when it's availiable and a J-Link programmer is used.
|
Maybe I should close this. include $(RIOTMAKE)/boards/sam0.inc.mkwith include $(RIOTMAKE)/tools/jlink.inc.mkNot sure if this is the way it is intended. |
|
@benpicco |
|
@dylad Well I'm not sure how this is intended to be used. I thought switching the programmer should be done by setting the But then I discovered that I can switch the programmer simply by replacing
If this is the indented way to do it, then this PR would be obsolete. |
AFAIK, this is the way to go.
replace it like this will break EDBG isn't it ? |
|
Well then this PR should still be valid. |
|
I'll test it ASAP. |
| PROGRAMMER ?= edbg | ||
| else ifeq ($(DEBUG_ADAPTER),jlink) | ||
| # only use JLinkExe if it's installed | ||
| ifneq (,$(shell command -v JLinkExe))) |
There was a problem hiding this comment.
Does it work on macOS (I'm a total newbie with macOS)
There was a problem hiding this comment.
Given that I added it out of considerations for portability, I would think so.
dylad
left a comment
There was a problem hiding this comment.
Tested ACK.
Try to flash tests/leds with jlink and edbg with several sam0 boards.
Currently sam0 will always use OpenOCD, even when the JLink programmer is selected.
Instead, use JLinkExe when it's availiable and a J-Link adapter is used.