Hello, I have an issue when debugging code with PIO, ESP32-S3, and the built-in JTAG interface.
Downloading of code works fine, however, when starting debugging with a breakpoint set, or with “tbreak setup” in the PIO INI file, the target does not stop. If the “pause/break” button is pressed the target stops and when continuing, it stops at breakpoints that were already set before starting the session.
This makes debugging startup code hard, is there a solution please?
HI @markgraham, It was a while ago and I don’t remember how I got it working. Unfortunately, JTAG debugging was so slow as to be pretty much not useful. I abandoned it and had to revert to serial printing debugging.
Sid
I had the same issue recently.
The internal USB-JTAG is limited compared to ESP-Prog hardware.
The bus speed is limited, plus the number of breakpoints is also limited to I think two break points.
Comment out debug_init_break and the debugger will stop at user set break points.
I had a further confusion in that the dev board I’m using is a common Chinese clone YD-ESP32-S3
The two USB ports are not marked which is serial and which is USB/OTG, for a while I was on the wrong USB-C
Seems the onboard USB/JTAG is only good for trivial debugging work, otherwise use ESP-Prog or similar
@matt1 I also found that deleting “debug_init_break” made user breakpoints work. However, the slow operation was a killer for me.
Unfortunately, the hardware I am working with does not break out the JTAG pins. I have used ESP-Prog on other projects, and it is just about acceptable.