Debugging Examples; Building Openocd From Sources - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 4. API Guides

4.17.7 Debugging Examples

This section is intended for users not familiar with GDB. It presents example debugging session from
simple application available under
1.
Navigating through the code, call stack and threads
2.
Setting and clearing breakpoints
3.
Halting the target manually
4.
Stepping through the code
5.
Checking and setting memory
6.
Watching and setting program variables
7.
Setting conditional breakpoints
Similar debugging actions are provided using GDB from
Before proceeding to examples, set up your ESP32-S2 target and load it with get-started/blink.

4.17.8 Building OpenOCD from Sources

Please refer to separate documents listed below, that describe build process.
Building OpenOCD from Sources for Windows
The following instructions are alternative to downloading binary OpenOCD from
the binary OpenOCD, instead of compiling it yourself, backup and proceed to section
Note: Following instructions are assumed to be runned in MSYS2 environment with MINGW32 subsystem!
Install Dependencies
Install packages that are required to compile OpenOCD:
pacman -S --noconfirm --needed autoconf automake git make
mingw-w64-i686-gcc
\
mingw-w64-i686-toolchain
mingw-w64-i686-libtool
mingw-w64-i686-pkg-config
mingw-w64-cross-winpthreads-git
p7zip
Download Sources of OpenOCD
Espressif GitHub under https://github.com/espressif/openocd-esp32. To download the sources, use the following
commands:
cd
~/esp
git clone --recursive https://github.com/espressif/openocd-esp32.git
The clone of sources should be now saved in ~/esp/openocd-esp32 directory.
Downloading libusb
Build and export variables for a following OpenOCD compilation:
wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z
7z x -olibusb ./libusb-1.0.22.7z
export
CPPFLAGS="$CPPFLAGS
export
LDFLAGS="$LDFLAGS
Espressif Systems
get-started/blink
and covers the following debugging actions:
Command
\
\
\
\
The sources for the ESP32-S2-enabled variant of OpenOCD are available from
-I${PWD}/libusb/include/libusb-1.0"
-L${PWD}/libusb/MinGW32/.libs/dll"
1378
Submit Document Feedback
Line.
Espressif
GitHub. To quickly setup
Setup of
\
Eclipse
using
OpenOCD.
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF