PlatformIO Community

Issue with ESP32: JTAG scan chain interrogation failed

Hello,
I have the following error messages when I try to debug:
Reading symbols from c:/Users/snoof/Documents/PlatformIO/Projects/181004-223214-arduino-wifiscan/.pioenvs/esp wrover kit/firmware.elf…
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target…
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : tcl server disabled
Info : telnet server disabled
Info : ftdi: if you experience problems at higher adapter clocks, try the command “ftdi_tdo_sample_edge falling”
Info : clock speed 20000 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: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors

I have carefully followed the instructions here:

But it is not working.

Do you have an idea how to find what the issue is?

Thanks.

1 Like

What jtag setup are you using?
Is that an Wrover kit? or you use a minimodule connected to some ESP32 dev board ?

it is a Wrover kit.
The thing is that I’ve tried this command and I have the same error message…
openocd-esp32\bin>openocd.exe -s …/share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg

and I have the same error.

I have done the same thing than in this tuto, the Debugging an ESP32 Wrover Kit part:

Is it possible that something is not right with my board?

For Wrover kit and Eclipse, the best tutorial is the official one: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/configure-wrover.html but it may be hard to follow for a beginner.

For VsCode and PlatformIO, i made a jtag setup tutorial here: ESP32 & PIO Unified Debugger
You may find this tutorial and PlatformIO debug easier to use than gdb+Eclipse

1 Like

I’ve been trying to get this damn debugger to work for two weeks now, even spending money to buy me PIO Plus.
In the meantime, I’ve probably worked through 5 or 6 tutorials and also that of botofancalin. All without success. I just can’t get the ESP32-WROVER-KIT to work with this shit debugger.
The error message I get is exactly the same as above. I can’t get any further. I’ve checked all connections on the board and they’re working fine.
:disappointed_relieved::disappointed_relieved::disappointed_relieved::disappointed_relieved:

What OS do you have? What platformio.ini do you use? Are you setting up the FTDI chip correctly using zadig? Do you have all jumpers set correctly for JTAG communication?

Hi, I use Windows 10 Pro 10.0.17763. My platform.ini is

`; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
debug_tool = ftdi
monitor_speed =115200
upload_port = COM14

lib_deps =
https://github.com/espressif/WROVER_KIT_LCD.git
…`

I tried zadig and also libusbK and the FTDI is configured correctly.

My jumpers are also set correct.

It is difficult to post a platform.ini with a lot of lib-deps if new users can only have 2 links or 2 images in a post :wink:

Something doesn’t seem right with that “WinDriver” device under “Jungo Connectivity”… Did it appear when you installed the WinUSB drivers via Zadig?

No, that screenshot was made after WinUSB installation.

problem solved!
on the ESP32 Wrover kit the jtag pins are also used by the SD card. To be able to debug I need to remove all SD card code, libraries and the SD card itself from the slot.

1 Like

I was experiencing the same problem. Turning down SPI Flash Speed to 20Mhz did the job for me. Surprised it didn’t say that anywhere in the documentation.