
Qiming Cloud/ 01
Have you ever encountered?
When using the ESP32-S3 module with ESP-IDF version idf 5.0, debugging JTAG, you try for a long time but cannot connect, why is that?
Qiming Cloud/ 02
What’s going on?
This process requires installing zadig for debugging,you need to install the WINUSB driver for interface 0 and interface 2 simultaneously.
Qiming Cloud/ 03
Debugging the issue
With the USB JTAG (Interface 2) driver installed, start debugging JTAG by executing “openocd -f board/esp32s3-builtin.cfg”, this command starts OpenOCD, but an error occurs:
In the JTAG documentation, it is mentioned: for custom boards with FT2232H or FT232H chips for JTAG connection, or custom boards with ESP-Prog, you can execute “board/esp32s3-ftdi.cfg”, it is recommended that customers try both, but still cannot connect.
Qiming Cloud/ 04
Windows Testing Environment
In the Windows environment, first download the hello project via UART to enter the module, then call “openocd -f board/esp32s3-builtin.cfg”, it will print information every 10 seconds; due to a reboot reason, switch to flashing the blink example, then start openocd, you should be able to run idf.py gdb directly in the blink directory, which should stop at app_main.
However, the actual test result when running idf.py gdb in the blink directory requires entering some commands for recognition (as shown below), and there is no response in openocd.
Finally, it was confirmed that idf.py gdb has issues on Windows, and I tried again using xtensa-esp32s3-elf-gdb -x build/gdbinit connect build/blink.elf. Ultimately, using xtensa-esp32s3-elf-gdb -x build/gdbinit connect build/blink.elf command test was successful.
Qiming Cloud/ 05
Solution
Install zadig, you need to install the driver for interface 0 as WINUSB, and also install for interface 2 as WINUSB, set up the environment on Windows, compile and flash the blink example, open a second terminal, and use the commandsudo apt install openocd to install openocd, then run the commandopenocd -f board/esp32s3-builtin.cfg, the result is:
Return to the terminal downloading blink and enter the command idf.py gdb, a build/gdbinit/connect file is generated in this project, and the result is as follows:
Then enter q in the command line and press enter to exit that interface; finally, enterxtensa-esp32s3-elf-gdb -x build/gdbinit/connect build/blink.elf and you will get the following running result, at this point JTAG has run successfully.
Qiming Cloud/ 06
Have you learned?
Shenzhen Qiming Cloud Technology Co., Ltd. is a partner and agent of Espressif in the Greater China region, focusing on the innovation and development of IoT communication products and overall solutions, providing technical support and services to over 3000 enterprises worldwide. We have developed our own AI online support platformhttps://support.8ms.xyz/supports, with a BS architecture that does not require login, providing 7×24 hour uninterrupted after-sales technical support to safeguard customer projects!

Previous Recommendations ·
[AI Technical Support] JTAG Debugging Demo for ESP32C3 Development Board in Linux Environment – Qiming Cloud
[AI Technical Support] ESP32-C3-MINI-1U Module Wake-up Freeze Issue – Qiming Cloud
[New Product Release] Qiming Cloud WT0132P4 Core Board Small Size High Performance, Based on Espressif ESP32-P4 Development Application
[AI Technical Support] ESP32-S3-WROOM-1U Module Voice Call Echo Optimization Issue – Qiming Cloud