An ESP32-DevKitC is set up for JTAG debugging and connected to a laptop with two USB cables. What does each cable carry?
One cable goes to the DevKitC's own USB port, where a CP2102N chip converts USB to the ESP32's UART: that is for flashing the firmware and for the serial monitor. The other goes to an FT232H breakout that speaks JTAG to the ESP32's GPIO12-15: that is for the debugger.
The two links do different jobs and use different chips:
| USB-to-UART (CP2102N) | USB-to-JTAG (FT232H) | |
|---|---|---|
| Where it is | Soldered on the DevKitC next to the micro-USB port | A separate breakout board, wired to the DevKitC on a breadboard |
| Talks to | The ESP32's serial port (UART0) and its boot/reset lines | The ESP32's JTAG pins (TDI, TDO, TCK, TMS) |
| Used by | idf.py flash monitor |
OpenOCD |
| What it can do | Load a new image into the ESP32's flash through the ROM bootloader, and show printf output |
Halt the CPUs, set breakpoints, step through code, read registers and memory, and also program flash |
Shows up in lsusb as |
10c4:ea60 Silicon Labs CP210x UART Bridge |
0403:6014 FTDI FT232H |
The original ESP32 has no USB hardware of its own, so a bridge chip is needed for each job. The FT232H is a general-purpose USB chip whose MPSSE engine (multi-protocol synchronous serial engine) can generate JTAG, SPI or I2C waveforms. Later Espressif chips such as the ESP32-C3 and ESP32-S3 include a built-in USB-JTAG bridge, so a single cable does both jobs there.
The ESP32-WROOM-32D module itself holds the dual-core Xtensa LX6 ESP32 chip and a separate 4 MB SPI flash chip. The firmware lives in that external flash, which matters later for how breakpoints work.
Go deeper:
Adafruit — FT232H breakout guide — what the FT232H and its MPSSE engine can do.
Wikipedia — FTDI — the company behind the FT232 family of USB bridge chips.