
Overview

FLASH SALE: Ends May 22!
Udemy online courses up to 85% off.
Get Deal
This 35-minute tutorial demonstrates how to debug an ESP32 running the Zephyr RTOS using OpenOCD and GDB. Learn how OpenOCD interfaces between your ESP32's JTAG hardware and debugging tools, while GDB provides a command-line interface for stepping through code, inspecting variables, and analyzing system behavior. Follow along with hardware setup using the ESP32-S3-DevKitC, which features a built-in hardware debugger connected via USB. Discover how to configure your host computer to communicate with the board, including tips for Windows users who need to install USB drivers using Zadig. Master the process of installing OpenOCD with ESP32 support and running it to connect to debugging hardware. Explore how to compile and flash firmware to the ESP32 using the blink demo from the first episode. Gain practical experience with GDB commands like break, step, and print for real-time debugging, and learn how to configure VS Code's launch.json for a graphical debugging experience. The tutorial includes links to written instructions, GitHub repository with challenge solutions, and additional resources for Zephyr development.
Syllabus
0:00 Intro
0:53 OpenOCD and GDB Overview
4:09 Installing and Running OpenOCD Server
11:27 Running GDB in a Docker Container
14:47 GDB Basic Commands for Debugging
26:58 Connecting GDB to VS Code
29:21 Debugging with VS Code
33:09 Challenge: Printing from USB Port
34:14 Conclusion
Taught by
Digi-Key