LOGBOOK

HELP

Quiz Entry - updated: 2026.11.10

In a JTAG debugging setup for the ESP32, what are the roles of the FT232H adapter, OpenOCD and GDB, and how do they talk to each other?

GDB is the debugger you type into. OpenOCD translates GDB's requests into JTAG operations and acts as a GDB server on TCP port 3333. The FT232H turns OpenOCD's USB commands into the electrical JTAG signals on the ESP32's pins.

A laptop runs GDB, which connects over TCP port 3333 to the OpenOCD GDB server; OpenOCD drives the FT232H over USB, which drives the ESP32's JTAG pins; separately, idf.py flash monitor reaches the ESP32 over the DevKitC's own USB port

* Three programs on the laptop, two USB links to the hardware. *

Each layer only knows its neighbours:

  1. GDB (the client), xtensa-esp32-elf-gdb, is a GDB built for the ESP32's Xtensa processor. It knows the program: it reads the ELF file to map addresses to source lines, function names and variables. It knows nothing about JTAG. It speaks the generic GDB remote serial protocol to a server ("read 4 bytes at this address", "set a breakpoint here", "continue").
  2. OpenOCD (the server), the Open On-Chip Debugger, knows the chip. A board configuration tells it which adapter to use, how the JTAG chain looks and how the ESP32's debug unit works. It listens for GDB on port 3333 and turns every request into the right sequence of JTAG register accesses.
  3. The FT232H (the adapter) knows the wires. It receives bytes over USB and clocks them out on TCK, TMS and TDI, reading TDO back.

The separation means the same GDB works with any chip OpenOCD supports, and the debugger does not have to run on the machine the board is plugged into: GDB can connect to port 3333 over the network.

The third program, idf.py flash monitor, is independent of the other two. It uses the DevKitC's own USB serial port to load the firmware and to show its log output.

Go deeper:

From Quiz: SIOT / JTAG Debugging with OpenOCD and GDB | Updated: Nov 10, 2026