EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1388 background imageLoading...
Page #1388 background image
Chapter 4. API Guides
user-name@computer-name:~/esp/esp-idf$ openocd -f board/esp32s2-kaluga-1.cfg
Open On-Chip Debugger v0.10.0-esp32-20200420 (2020-04-20-16:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
force hard breakpoints
Info : ftdi: if you experience problems at higher adapter clocks, try the command
,"ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32s2.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica),
, part: 0x2003, ver: 0x1)
Info : esp32s2: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32s2: Core was reset (pwrstat=0x5F, after clear 0x0F).
If there is an error indicating permission problems, please see section on Permissions delegationin the
OpenOCD README file located in the ~/esp/openocd-esp32 directory.
In case there is an error in finding the configuration files, e.g. Can't find board/esp32s2-kaluga-
1.cfg, check if the OPENOCD_SCRIPTS environment variable is set correctly. This variable is used by
OpenOCD to look for the files specified after the -f option. See Setup of OpenOCD section for details. Also
check if the file is indeed under the provided path.
If you see JTAG errors (e.g., ...all ones or ...all zeroes), please check your JTAG connections,
whether other signals are connected to JTAG besides ESP32-S2s pins, and see if everything is powered on
correctly.
Upload application for debugging
Build and upload your application to ESP32-S2 as usual, see Step 8. Build the Project.
Another option is to write application image to flash using OpenOCD via JTAG with commands like this:
openocd -f board/esp32s2-kaluga-1.cfg -c "program_esp filename.bin 0x10000 verify
,exit"
OpenOCD flashing command program_esp has the following format:
program_esp <image_file> <offset> [verify] [reset] [exit]
image_file - Path to program image file.
offset - Offset in flash bank to write image.
verify - Optional. Verify flash contents after writing.
reset - Optional. Reset target after programing.
exit - Optional. Finally exit OpenOCD.
You are now ready to start application debugging. Follow the steps described in the section below.
4.17.6 Launching Debugger
The toolchain for ESP32-S2 features GNU Debugger, in short GDB. It is available with other toolchain programs
under filename: xtensa-esp32s2-elf-gdb. GDB can be called and operated directly from command line in a terminal.
Another option is to call it from within IDE (like Eclipse, Visual Studio Code, etc.) and operate indirectly with help
of GUI instead of typing commands in a terminal.
Both options of using debugger are discussed under links below.
Eclipse
Command Line
It is recommended to first check if debugger works from Command Line and then move to using Eclipse.
Espressif Systems 1377
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish