platform-teensy
platform-teensy copied to clipboard
Enable JLink in JTAG instead of SWD mode for debugging
The code at
https://github.com/platformio/platform-teensy/blob/586031e92429004ee9c8003674ba8a78520a0096/platform.py#L74-L83
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
https://github.com/platformio/platform-teensy/blob/586031e92429004ee9c8003674ba8a78520a0096/builder/main.py#L189-L195
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.