Problems trying to download via j-link

Status
Not open for further replies.

smachin

Member
Hi All,

I've been successfully building and downloading my code for many months now using the default USB downloader. One of my boards is wired for SWD and we have the Segger j-link adapter. I've independently tested this works by downloading & single-stepping code from the Kinetis Design Studio.

This morning I wanted to try downloading using pio & j-link. I added these two lines to my platformio.ini:

upload_protocol = jlink
debug_tool = jlink


However it didn't work, I got this error msg. below. Any ideas as to what went wrong?

------------------------------------------------------------------------------------------------------------------------------
Linking .pioenvs\teensy31\firmware.elf
Checking program size
text data bss dec hex filename
194667 0 8576 203243 319eb .pioenvs\teensy31\firmware.elf
Building .pioenvs\teensy31\firmware.hex
Configuring upload protocol...
AVAILABLE: jlink, jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = jlink
Uploading .pioenvs\teensy31\firmware.hex
SEGGER J-Link Commander V6.30h (Compiled Mar 16 2018 18:03:09)
DLL version V6.30h, compiled Mar 16 2018 18:02:51

Unknown command line option Machin\Dropbox\CaneBeta1\.pioenvs\teensy31\upload.jlink.
*** [upload] Error 1
============================================= [ERROR] Took 10.81 seconds =============================================
 
Hi All,

I've been successfully building and downloading my code for many months now using the default USB downloader. One of my boards is wired for SWD and we have the Segger j-link adapter. I've independently tested this works by downloading & single-stepping code from the Kinetis Design Studio.

This morning I wanted to try downloading using pio & j-link. I added these two lines to my platformio.ini:

upload_protocol = jlink
debug_tool = jlink


However it didn't work, I got this error msg. below. Any ideas as to what went wrong?

------------------------------------------------------------------------------------------------------------------------------
Linking .pioenvs\teensy31\firmware.elf
Checking program size
text data bss dec hex filename
194667 0 8576 203243 319eb .pioenvs\teensy31\firmware.elf
Building .pioenvs\teensy31\firmware.hex
Configuring upload protocol...
AVAILABLE: jlink, jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = jlink
Uploading .pioenvs\teensy31\firmware.hex
SEGGER J-Link Commander V6.30h (Compiled Mar 16 2018 18:03:09)
DLL version V6.30h, compiled Mar 16 2018 18:02:51

Unknown command line option Machin\Dropbox\CaneBeta1\.pioenvs\teensy31\upload.jlink.
*** [upload] Error 1
============================================= [ERROR] Took 10.81 seconds =============================================

maybe you check at the platformio forum.
You asked All, so my 2 cents: As far as I'm concerned, Tensies are to be programmed with Teensyduino Tools.
 
That is a fair comment (RE Teensyduino tools), I don't know how you are supposed to get serious debugging done without some kind of low level HW support (e.g. JTAG, SWD etc.).
 
I don't know how you are supposed to get serious debugging done without some kind of low level HW support (e.g. JTAG, SWD etc.).

What about writing error free code from the beginning? ;)
Or using the integrated Led or serial.print for debugging and tracing messages?
I guess more than 90% of Teensy developers (and 99.9% of Arduino developers) work this way. It's sometimes a challenge, but it's apparently not impossible.
 
That is a fair comment (RE Teensyduino tools), I don't know how you are supposed to get serious debugging done without some kind of low level HW support (e.g. JTAG, SWD etc.).

Well, the truth is that T3.5/3.6 are in theory be capable of supporting SWD and some users are using it, but the majority of actual Forum users are not using HW level debugging.
Also, AFAIK the bootloader on T3.5/3.6 is not programmed to allow the SWD pins used without HW modification.
 
Status
Not open for further replies.
Back
Top