PlatformIO Community

ESP-WROOM-32 Esp-prog not working

Hello, I’ve tried a lot of things and still can’t get the debugger to work :

  • I have installed the FTDI drivers
  • I have checked multiple times my connections
  • I have tried using different board and different computers
  • I have tried flashing the factory firmware to see if JTAG was disabled, using the esp-prog as FTDI and espressif’s flash download tool, it flashed correctly.
  • I have tried connecting manually with OpenOCD, it did not connect.
  • I have tried both Winusb and Libusb drivers, on interface 0 or both interfaces, with reboots between tests.

My boards are the DOIT Devkit V1 and the AZ Delivery Devkit C.
I do not know what i’m doing wrong, maybe the factory firmware has JTAG disabled by default.
The script I try to debug is a basic blink so it doesn’t use pins 12 to 15.

Here is the log when trying to debug : https://pastebin.com/nvfY5pca
and when trying to upload : https://pastebin.com/w3tMM1bm

(Yes, the project is called Waterboard because it’s a board to water my plants)

Error: JTAG scan chain interrogation failed: all zeroes

Every instance of that error I’ve seen it was an issue with

  • the wiring (e.g., broken or poor-quality cable)
  • or debug speed too high
  • jumpers not set correctly on development boards, causing the signals to get through to the ESP32

See e.g. ESP32 & PIO Unified Debugger and Error ESP32 PROG

Full platformio.ini? You have e.g. debug_speed = 500 in there as a test?

I’ve seen two more causes:

  • One of the JTAG pins GPIO12, GPIO13, GPIO14 or GPIO15 is used for something else or has been reconfigured by software
  • Software puts ESP32 in deep sleep (JTAG interface is turned off in deep sleep)

Here is my full platformio.ini, after adding debug_speed = 500 as you recommended
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
debug_tool = esp-prog
debug_init_break = tbreak setup
debug_speed = 500
upload_protocol = esp-prog
Adding that line did not solve the issue.

The connections show continuity from pad to pad and here is my connections map :

  • TMS to 14
  • TCK to 13
  • TDO to 12
  • TDI to 15
  • Power is good because the onboard LED lights up

My board doesn’t have any jumpers, and i’ve already seen those links.

In Low-cost ESP32 In-circuit Debugging | by Manuel Bl. | Medium I see that TDI is 12, not 15. And TDO is not 12, but 15.

That is probably for the Olimex programmer. I flipped those two but it still didn’t work, same error, both in upload and debug.

Nono, the “GPIOx” definitions are that of the ESP32. The ESP32 chip has its TDI pin at GPIO12 and the programmer’s pin must be connected there.

The question is whether you’ve destroyed the ESP32 module by connecting by reversing the test-data-output and test-data-input pins – creating a driver conflict on the output pin.

I’ll check my ESP32 + FTDI debug probe with the exact platformio.ini you’ve posted and see if that’s the problem.

I am having no problems at all with the platformio.ini you’ve posted.

Following the article I’ve linked above in the “Generic FT232H board” together with my Adafruit FT232H breakout regarding the pin connections and loading WinUSB drivers via Zadig, and using your platformio.ini, I get

grafik

PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20201202 (2020-12-02-17:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
2
Info : FreeRTOS creation
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
...

Are you using an Olimex programmer? Then you should another debug_tool = .. as per docs.

Otherwise maybe change out the jumper cables completely, double-check all connections (especially TDI and TDO), or try a new development board.

Even I did an oopsie when connecting the board – I had the TMS from my programmer connected to GPIO4 instead of the right GPIO14, and openocd gave me an “all ones” error.

Well, that is frustrating. I’m not using an Olimex programmer. Are you using the same dev board I am using ?

Please provide an image of your setup showing the board, the debug adapter and all connections.

I’ve uploaded the photos to Imgur : https://imgur.com/a/rkm0I4p
In the photos, the esp-prog is not connected to the computer, but usually it is connected via front panel USB3.0 connector, and the red LEDs on both the esp-prog and the DOIT Devkit v1 are lit.

Do you power the dev board separately with its own USB cable, or from the ESP-PROG? I’m powering it externally.

I’ve tried both, no luck

My connections and dev board can be seen per https://imgur.com/a/AP9qcg7.

All I’m doing is just connecting the 4 JTAG connections plus GND between the adapter and board, and power each separately (first the dev board, then the adapter).

Can you try and just connect the 5 wires as shown in the article’s picutre

grafik

to the board with short wires?

Your setup doesn’t show any obvious mistake. I’ve studied the image and think the wiring is ok (based on the pinout I assume your dev board has). For light loads, it should be possible to power the ESP32 via ESP-Prog but for the moment I would disconnect the Vcc wire and power it via USB, just to be on the safe side.

Other than that I can only recommend to check and recheck the wiring (incl. a multimeter). It’s so easy to have a poor connection or mix pins.

The error message clearly indicate it isn’t a software problem nor a problem with the connection to your ESP-Prog.

I have added a picture of the new wiring to the previous link I sent. Same results. I’ll try buying another esp-prog and i’ll keep you updated.
Thanks for the help !

Seems i’m cursed. It still doesn’t work… Same error. :confused:
That is with another esp-prog.

Have you tried another ESP32 board?

I tried the two different models that I own yes.

EDIT : I just tried changing USB ports, did not help either.
EDIT2 : I just tried reinstalling the drivers via device manager, disabling device driver signing, deleting /.platformio… Still no success.
Might just be that the esp-prog isn’t supported by libusb, the chip on it is a FT2232HL