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
[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.
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
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.
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.
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).
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 !
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