JTAG debuging in platformio

Hello there,
I really have troubles to debug cellcube software using a J-Link or ST-LINK adapter in PlatformIO. Any hints in this direction?
Thanks, Edi

I think it would help if you describe what you tried and how it failed.

@joba1 I took an ST-LINK and connected

ST-LINK     <--> CubeCell Board
3V3 (Pin 2) <--> 3V3
GND (Pin 7) <--> GND
SWC (Pin 4) <--> SWC (GPIO7)
SWD (PIN 6) <--> SWD (GPIO6)

Then I first wanted to know if I can get any connection to the CubeCell by $ openocd -f interface/stlink-v2.cfg -f target/psoc4.cfg but it was to no avail:

edi@beast:~/Projekte/CubeCell$ openocd -f interface/stlink-v2.cfg -f target/psoc4.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1500 kHz
Info : Unable to match requested speed 1500 kHz, using 1200 kHz
Info : Unable to match requested speed 1500 kHz, using 1200 kHz
Info : clock speed 1200 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.542025
Error: init mode failed (unable to connect to the target)
in procedure 'init' 
in procedure 'ocd_bouncer'

my st-link has a 3.3V pin that is only good for measuring but not delivering power/voltage. Maybe that is your problem? I had to use a pin on another connector.

edit: and my experience with st-link only includes stm32 chips. Maybe others can chime in…

@joba1 Well, I also tried it with USB connected to power, did not work.
Hm, I ordered some parts to make an adapter for my Blackmagic Probe… I will report back if this works

No, Blackmagic also does not work…

Just out of curiousity are you using this version of openocd ?

No, the standard that ships with Ubuntu 20.04. Will try the one you pointed to later, thanks!

This the below linked article from May 21 seems to say J-Link/ST-Link are not supported, that would be a shame if true. I miss the debugging. Have not tried it myself…
Paragraph 6:

Heltec uses a custom CubeCell bootloader for ASR650x where serial number/license is stored into flash to enable Arduino support. Due to implementation thereof it is unfortunately not possible to use the ARM SWD interface for firmware upload and debugging (with J-Link or ST-Link).


Well, you only have to pay attention not to overwrite row 3 of the user flash… or back it up before :sweat_smile:

1 Like

So, perhaps it is doable? That would be good to hear.

I’m researching it with a friend. It seems that timing after reset is important.

CubeCell does not support ST-LINK.

Yes, we found out. Which JTAG adapter would you recomend?

JTAG is not currently supported, we use kitProg3 (PSoC).

OK, thank you. But as I understand, KitProg also uses SWD as transport. I’ll report back as soon as I got my J-Link

1 Like

Does Heltec have an “app developer guide to using a debugger with the Cubecell” sort of document?

Sorry, we currently do not have this type of document.

I’m using a kitgProg3 but I’m unable to communicate with a HTCC-AB01 board - anything special other than connecting SWD, SWC, RES, GND pins? The board is resetting while trying to connect - but the acquistion doesn’t happen with PSoC Programmer. Ping @shaffer?

You are not connected to the power supply.