-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sam0: allow flashing with JLinkExe #11725
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
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.mk with include $(RIOTMAKE)/tools/jlink.inc.mk Not 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work on macOS (I'm a total newbie with macOS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that I added it out of considerations for portability, I would think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.