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 #1397 background imageLoading...
Page #1397 background image
Chapter 4. API Guides
The project configuration option CONFIG_SECURE_BOOT_ALLOW_JTAG will keep JTAG enabled at this time,
removing all physical security but allowing debugging. (Although the name suggests Secure Boot, this option can be
applied even when only Flash Encryption is enabled).
However, OpenOCD may attempt to automatically read and write the flash in order to set software breakpoints. This
has two problems:
Software breakpoints are incompatible with Flash Encryption, OpenOCD currently has no support for encrypt-
ing or decrypting flash contents.
If Secure Boot is enabled, setting a software breakpoint will change the digest of a signed app and make the
signature invalid. This means if a software breakpoint is set and then a reset occurs, the signature verication
will fail on boot.
To disable software breakpoints while using JTAG, add an extra argument -c 'set ESP_FLASH_SIZE 0' to
the start of the OpenOCD command line, see OpenOCD configuration variables.
Note: For the same reason, the ESP-IDF app may fail bootloader verification of app signatures, when this option is
enabled and a software breakpoint is set.
Reporting issues with OpenOCD / GDB In case you encounter a problem with OpenOCD or GDB programs
itself and do not find a solution searching available resources on the web, open an issue in the OpenOCD issue tracker
under https://github.com/espressif/openocd-esp32/issues.
1. In issue report provide details of your configuration:
a. JTAG adapter type, and the chip/module being debugged.
b. Release of ESP-IDF used to compile and load application that is being debugged.
c. Details of OS used for debugging.
d. Is OS running natively on a PC or on a virtual machine?
2. Create a simple example that is representative to observed issue. Describe steps how to reproduce it. In such
an example debugging should not be affected by non-deterministic behaviour introduced by the Wi-Fi stack,
so problems will likely be easier to reproduce, if encountered once.
3. Prepare logs from debugging session by adding additional parameters to start up commands.
OpenOCD:
openocd -l openocd_log.txt -d3 -f board/esp32s2-kaluga-1.cfg
Logging to a file this way will prevent information displayed on the terminal. This may be a good thing taken
amount of information provided, when increased debug level -d3 is set. If you still like to see the log on the
screen, then use another command instead:
openocd -d3 -f board/esp32s2-kaluga-1.cfg 2>&1 | tee openocd.log
Debugger:
xtensa-esp32s2-elf-gdb -ex "set remotelogfile gdb_log.txt" <all other options>
Optionally add command remotelogfile gdb_log.txt to the gdbinit file.
4. Attach both openocd_log.txt and gdb_log.txt files to your issue report.
4.17.10 Related Documents
Using Debugger
This section covers configuration and running debugger using several methods:
from Eclipse
from Command Line
using idf.py debug targets
Espressif Systems 1386
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