Skip to content
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

Enable JLink in JTAG instead of SWD mode for debugging #71

Open
maxgerhardt opened this issue Jan 10, 2021 · 0 comments
Open

Enable JLink in JTAG instead of SWD mode for debugging #71

maxgerhardt opened this issue Jan 10, 2021 · 0 comments

Comments

@maxgerhardt
Copy link

maxgerhardt commented Jan 10, 2021

The code at

debug['tools']['jlink'] = {
"server": {
"package": "tool-jlink",
"arguments": [
"-singlerun",
"-if", "SWD",
"-select", "USB",
"-device", debug.get("jlink_device"),
"-port", "2331"
],

Configures the debug_tool = jlink debugging method to hardcode SWD as the debugging protocol. There is no way to specify jtag here instead of swd normally, a user would have to specify a custom debug_server and friends command (which was e.g. done in this community post).

Interestingly, for uploading, such option is respected

UPLOADERFLAGS=[
"-device", board_config.get("debug", {}).get("jlink_device"),
"-speed", "4000",
"-if", ("jtag" if upload_protocol == "jlink-jtag" else "swd"),
"-autoconnect", "1",
"-NoGui", "1"
],

And it then does a -if jtag.

Can the code be adapted so that if a user e.g. writes debug_tool = jlink-jtag, that change is also carried over?

The documentation at https://docs.platformio.org/en/latest/plus/debug-tools/jlink.html should be adapted accordingly then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant