Debugging ESP32 - how?

Here it’s said that many ESP32 boards can be debugged with Mini-Module. How should I connect it with ESP32? Is any wiring scheme available?

1 Like

But the instructions are for ESP-WROVER-KIT only, which has an integrated debugger, so guides for other boards with external debuggers are welcome.

1 Like

We are working on the new updates for docs which will cover ESP32 debugging and wiring schemes. We will inform here and on https://twitter.com/PlatformIO_Org

1 Like

To debug ESP32 using FTDI2232 minimodule, here is the required connection:

FTDI AD0 → ESP32 GPIO13 (TCK)
FTDI AD1 → ESP32 GPIO12 (TDI)
FTDI AD2 → ESP32 GPIO15 (TDO)
FTDI AD3 → ESP32 GPIO14 (TMS)
FTDI AC2 → ESP32 EN (RST)
FTDI GND → ESP32 GND

Here are the platformio settings i use:

[env:esp32dev]
platform = GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO
framework = arduino
board = esp32dev
monitor_speed = 115200
upload_speed = 921600
debug_tool = minimodule

Here is a debug example using this setup:

1 Like

Thank you very much for the idea! We updated our docs and add different wiring connection schemes. See Mini-Module FT2232H — PlatformIO latest documentation

I checked the FT2232 minimodule datasheet and i found that you must connect Vbus to VCC
(CN3 pin 1 to pin 3) to power the FTDI chip.

Capture

Thanks again! Docs is updated! :blush:

Hi, I’ve followed your set-up but I can’t debug my project. OpenOCD can’t find the FT2232h but I’ve powered the chip as you suggested and I’ve linked the jtag as above. It doesn’t work.
Do you work on windows? The FT2232h is seen as 4 usb-com port (should be 2).
Do you have any idea? Thank you.

What is your board? What is your JTAG adapter?

Hi, I had started a new topic here with this problem:
[ESP32dev - PIO Unified Debugger - setup problem]

Please check my answer on the thread: ESP32dev - PIO Unified Debugger - setup problem - #3 by Nist3l

And the instructions i posted on this thread: ESP32 & PIO Unified Debugger - #20 by botofancalin

1 Like

See Get started with Arduino and ESP32-DevKitC: debugging and unit testing — PlatformIO latest documentation