Debugging ESP32 - how?


#1

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?


#2

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


#3

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


#4

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 = https://github.com/platformio/platform-espressif32.git
framework = arduino
board = esp32dev
monitor_speed = 115200
upload_speed = 921600
debug_tool = minimodule

Here is a debug example using this setup:


#5

Thank you very much for the idea! We updated our docs and add different wiring connection schemes. See http://docs.platformio.org/en/latest/plus/debug-tools/minimodule.html


#6

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


ESP32 & PIO Unified Debugger
#7

Thanks again! Docs is updated! :blush:


#8

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.


#9

What is your board? What is your JTAG adapter?


#10

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


#11

Please check my answer on the thread: ESP32dev - PIO Unified Debugger - setup problem

And the instructions i posted on this thread: Esp32 C++ debug problem


#12

See http://docs.platformio.org/en/latest/tutorials/espressif32/arduino_debugging_unit_testing.html