
Discover how the esp32-c3 jtag interface enables debug via openocd and the gdp, detailing jtag signals, hardware connections, and the usb integrated jtag option.
Explore OpenOCD, the open source on-chip debugger, and learn to configure and run it with ESP32-C3 using built-in USB JTAG and target configs.
About the hardware, the esp32 company "espressif" it has one board named ESP32-C3-DevKit-RUST-1, it is an open source hardware project. You can get the schematics, gerber files and kicad files from this linker in the external resources. The board has one jtag and flash usb interface. You can DIY one board or directly buy one from that linker.
About the software, all the course examples have been tested on idf sdk ver4.4.1 software. You also can download the esp-idf-tools-setup-offline-4.4.1 software from this google drive linker in the external resources.
Learn how to set and manage GDB breakpoints for ESP32 JTAG debugging, including line-number and function-name breaks, temporary vs regular breaks, and using info break and delete.
Learn to use the gdb print command for esp32 jtag debugging to inspect and modify variables, arrays, strings, and structures; print in int, hex, and binary formats, and view addresses.
Learn to use the display command for esp32 jtag debugging, compare it with the print command, and display multiple values in hex or normal formats, including enabling, disabling, and deleting displays.
Learn how to use the GDB examine (x) command for ESP32 JTAG debugging to print memory, strings, and arrays in hex, decimal, binary, or string formats.
Explore GDB ptype and whatis commands for ESP32-C3 jtag debugging, compare their outputs for integers, arrays, and structures, and learn how ptype provides detailed structure information beyond whatis.
Learn to use the gdb stack command for esp32 jtag debugging to print stack traces, frames, and call flows with backtrace, where, and info frame; explore thread stacks.
Explore how the GDB jump command for ESP32 JTAG debug changes program flow by ignoring, repeating, and running branch code. See testing with breakpoints and OpenOCD to verify execution paths.
Learn how the gdb set command works in ESP32 JTAG debugging, including setting code and environment variables to steer program flow and support automated debugging scripts.
This course focus on how to use GDB to implement the JTAG debug for ESP32-C3 firmware software through OpenOCD.
We will learn the JTAG debug skill for the following GDB commands:
(1) Break command: learn how to add break point at different positions of the code, how to check the break point information, delete break point and set the temporary break point;
(2) Watch command: learn how to watch the value for different types of variables, such as, integer, pointer and expression;
(3) Next, Step, Until command: Learn how to debug the code step by step;
(4) Print command: learn how to print out data value for the integer, array, string, struct and variables in different functions and files, also included how to set data with different values by print command;
(5) Display command: learn how the display command automatically show the variables' value;
(6) Examine command: learn how to show variables' value according the memory address;
(7) Ptype, whatis command: learn how to show the type of the variables;
(8) Backtrace, where, frame command: learn how to trace the code by the stack information;
(9) Jump command: learn how to ignore code, repeat code and run branch code by the jump comand;
(10) Set command: learn how to set "code" variable value and how to set "environment" variable value;
(11) Define command: learn how to create a new "command" by using define command;
NOTES:
The course is based on one ESP32-C3 USB JTAG board, NOT one normal ESP32 board. You can get more information from lecture 4.