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.
The code at
platform-teensy/platform.py
Lines 74 to 83 in 586031e
Configures the
debug_tool = jlinkdebugging method to hardcode SWD as the debugging protocol. There is no way to specifyjtaghere instead ofswdnormally, a user would have to specify a customdebug_serverand friends command (which was e.g. done in this community post).Interestingly, for uploading, such option is respected
platform-teensy/builder/main.py
Lines 189 to 195 in 586031e
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.