Espressif ESP32-S2 Programming Manual page 1270

Table of Contents

Advertisement

Chapter 4. API Guides
Log Trace Processor Command Options
logtrace_proc.py [-h] [--no-errors] <trace_file> <elf_file>
Positional arguments:
trace_file Path to log trace file
elf_file Path to program ELF file
Optional arguments:
-h, --help show this help message and exit
--no-errors, -n Do not print errors
System Behavior Analysis with SEGGER SystemView
Another useful IDF feature built on top of application tracing library is the system level tracing which produces traces
compatible with SEGGER SystemView tool (see SystemView). SEGGER SystemView is a real-time recording and
visualization tool that allows to analyze runtime behavior of an application.
Note: Currently IDF-based application is able to generate SystemView compatible traces in form of files to be
opened in SystemView application. The tracing process cannot yet be controlled using that tool.
How To Use It
Support for this feature is enabled by Component config > Application Level Tracing > FreeR-
TOS SystemView Tracing (CONFIG_APPTRACE_SV_ENABLE) menuconfig option. There are several other options
enabled under the same menu:
1. ESP32-S2 timer to use as SystemView timestamp source: (CONFIG_APPTRACE_SV_TS_SOURCE) selects
the source of timestamps for SystemView events. In single core mode timestamps are generated using ESP32-
S2 internal cycle counter running at maximum 240 Mhz (~4 ns granularity). In dual-core mode external timer
working at 40 Mhz is used, so timestamp granularity is 25 ns.
2. Individually enabled or disabled collection of SystemView events (CONFIG_APPTRACE_SV_EVT_XXX):
• Trace Buffer Overflow Event
• ISR Enter Event
• ISR Exit Event
• ISR Exit to Scheduler Event
• Task Start Execution Event
• Task Stop Execution Event
• Task Start Ready State Event
• Task Stop Ready State Event
• Task Create Event
• Task Terminate Event
• System Idle Event
• Timer Enter Event
• Timer Exit Event
IDF has all the code required to produce SystemView compatible traces, so user can just configure necessary project
options (see above), build, download the image to target and use OpenOCD to collect data as described in the previous
sections.
OpenOCD SystemView Tracing Command Options
esp sysview [start <options>] | [stop] | [status]
Sub-commands:
start Start tracing (continuous streaming).
stop Stop tracing.
status Get tracing status.
Espressif Systems
Command usage:
Command usage:
1259
Submit Document Feedback
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?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF