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 my full platformio.ini, after adding debug_speed = 500 as you recommended
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.
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
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
adapter speed: 20000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
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.
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.
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.
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