ESP32-S3 JTAG Debugging User Guide

## 1 The ESP32-S3 support use the JTAG pins or USB pins for JTAG debugging. For more instructions,please read the “ESP32-S3 JTAG Debugging ”guide.

For debugging with JTAG pins, you need to use the ESP-PROG tool.

ESP32-S3 Pin JTAG Signal
MTDO / GPIO40 TDO
MTDI / GPIO41 TDI
MTCK / GPIO39 TCK
MTMS / GPIO42 TMS
  • ESP32-S3 has a built-in JTAG circuitry and can be debugged without any additional chip. Only an USB cable connected to the D+/D- pins is necessary. The necessary connections are shown in the following section. Please read the "Configure ESP32-S3 built-in JTAG Interface " instructions.
ESP32-S3 Pin USB Signal
GPIO19 D-
GPIO20 D+
5V V_BUS
GND Ground

2 Before JTAG debugging , please set up the esp-idf SDK software environment. please refer to the "ESP-IDF Programming Guide " .The ESP32-S3 only supports release/v4.4 and later version of the ESP-IDF SDK. Please refer to the “ESP-IDF Release and SoC Compatibility” instructions.

The software development environment we recommend to you is the simplest.

3 The following are the JTAG debugging steps:

  • Under the esp-idf SDK compilation environment, to open the “openocd” environment,Please refer to the "Run OpenOCD " . For example,
openocd -f C:\Users\caiguanhong\.espressif\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\share\openocd\scripts\board\esp32s3-builtin.cfg
  • Next , to flash the firmware:
idf.py flash
  • Then , Under the current debug project, create a configuration file named “gdbinit” and write the following. Please read the “Command Line ” instructions.
target remote :3333
set remote hardware-watchpoint-limit 2
mon reset halt
flushregs
thb app_main
c

图像_2023-03-10_15-05-59.png

  • Last , to enable the “GDB” environment. Please refer to “” . For example,
xtensa-esp32s3-elf-gdb -x gdbinit build\hello_world.elf

图像_2023-03-10_15-08-04.png

  1. The BSDL file can refer to “openocd-esp32 ” Source Code.

猜你喜欢

转载自blog.csdn.net/Marchtwentytwo/article/details/129561010