Page 1 of 1

ESP32 JLink Debugging

Posted: Wed Nov 02, 2022 12:05 pm
by suhas_s
I am trying to debug my app running on ESP32 DevKit V1 using JLink and openocd. I have connected the GPIO pins to JLink using jumper wires as recommended in esp32 docs, but when I run openocd to start debugging I get the below error.
Can any one help me with this error? Also is JTAG enabled by default in ESP32 dev kits or we need to enable it ourself before debugging?

Connection:
Gnd -> Gnd
GPIO14 -> TMS
GPIO12 -> TDI
GPIO13 -> TCK
GPIO15 -> TDO

OpenOCD Error:
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V9 compiled May 7 2021 16:26:12
Info : Hardware version: 9.10
Info : VTarget = 0.000 V
Info : clock speed 4000 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: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32.cpu0 examination failed
Warn : target esp32.cpu1 examination failed

Re: ESP32 JLink Debugging

Posted: Thu Nov 03, 2022 12:51 am
by ESP_Sprite
The error you see is a generic communication error between the JTAG adapter and the chip; the JTAG signals aren't reaching the core correctly for some reasons. Aside from faulty wiring, this can also be caused by a program running on the ESP32 that reconfigures these pins. Suggest you try starting the ESP32 in bootloader mode (push and hold the boot button while resetting the devboard) and try again then.