ESP32-S3 JLink JTAG

vinci1989
Posts: 28
Joined: Mon Oct 08, 2018 6:07 pm

ESP32-S3 JLink JTAG

Postby vinci1989 » Sun Jul 03, 2022 4:04 pm

Hi

Has anyone successfully got an ESP32-S3 debugged using a JLink debugger? I've been trying to establish a connection to my ESP32-S3-DevKitM for the last 4h and this is starting to get really annoying.

I've red the documentation which says to burn eFuse DIS_USB_JTAG. Apparently this should disable the internal USB JTAG and enable JTAG on GPIO39-GPIO42. So far so good. Yet, I couldn't connect.

I've later also burned DIS_USB_SERIAL_JTAG and hopefully not disabled JTAG altogether. Still, no success.

So here's what my OpenOCD output currently looks like:

Code: Select all

❯ bin/openocd -c "adapter speed 1000" -s share/openocd/scripts -f interface/jlink.cfg -f target/esp32s3.cfg
Open On-Chip Debugger  v0.11.0-esp32-20220411 (2022-04-11-08:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Nov  2 2021 12:14:50
Info : Hardware version: 10.10
Info : VTarget = 3.296 V
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32s3.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32s3.cpu0 examination failed
Info : esp32s3.cpu1: Debug controller was reset.
Info : esp32s3.cpu1: Core was reset.
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
According to some forum posts this error is supposed to be a "bad contact" or wrongly wired cable. After 4 hours of swapping and re-checking things I can say, no, it's not. Also my program doesn't reconfigure any GPIO pins at all. It's basically the hello_world example except it doesn't reboot after 10s.

Trying to connect anyhow (despite the errors above) doesn't work either:

Code: Select all

Error: Target not examined yet
Error executing event gdb-attach on target esp32s3.cpu0:

Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Any suggestions?

vinci1989
Posts: 28
Joined: Mon Oct 08, 2018 6:07 pm

Re: ESP32-S3 JLink JTAG

Postby vinci1989 » Mon Jul 04, 2022 7:00 pm

New day, new luck. I've tried debugging a ESP32-S3-DevKitC-1 module today.
This time I've only burnt the "JTAG_SEL_ENABLE" fuse and connected GPIO3 to ground. This should enable external JTAG debugging.

Still doesn't work, although for some funny reason the "IR capture" is different...

Code: Select all

bin/openocd -c "adapter speed 1000" -s share/openocd/scripts -f interface/jlink.cfg -f target/esp32s3.cfg
Open On-Chip Debugger  v0.11.0-esp32-20220411 (2022-04-11-08:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Nov  2 2021 12:14:50
Info : Hardware version: 10.10
Info : VTarget = 3.296 V
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32s3.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32s3.cpu0 examination failed
Warn : target esp32s3.cpu1 examination failed
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections

vinci1989
Posts: 28
Joined: Mon Oct 08, 2018 6:07 pm

Re: ESP32-S3 JLink JTAG

Postby vinci1989 » Thu Jul 07, 2022 8:32 am


User avatar
mfeil-leviton
Posts: 2
Joined: Mon Jul 31, 2023 9:52 pm

Re: ESP32-S3 JLink JTAG

Postby mfeil-leviton » Mon Jul 31, 2023 9:55 pm

I checked out your Github thread... Did you ever find out what the original issue was? I am having the exact same problem. Just a slightly different J-Link box.
Matt

vinci1989
Posts: 28
Joined: Mon Oct 08, 2018 6:07 pm

Re: ESP32-S3 JLink JTAG

Postby vinci1989 » Mon Sep 18, 2023 2:37 pm

Sadly no. Haven't tried JTAG debugging with a JLink since...

Who is online

Users browsing this forum: No registered users and 63 guests