Chapter 2. API Reference
ESP_IMAGE_FLASH_SIZE_8MB
SPI flash size 8 MB
ESP_IMAGE_FLASH_SIZE_16MB
SPI flash size 16 MB
ESP_IMAGE_FLASH_SIZE_MAX
SPI flash size MAX
2.6.2 Application Level Tracing
Overview
IDF provides useful feature for program behaviour analysis: application level tracing. It is implemented in the cor-
responding library and can be enabled via menuconfig. This feature allows to transfer arbitrary data between host
and ESP32-S2 via JTAG interface with small overhead on program execution. Developers can use this library to
send application specific state of execution to the host and receive commands or other type of info in the opposite
direction at runtime. The main use cases of this library are:
1. Collecting application specific data, see Application Specific Tracing
2. Lightweight logging to the host, see Logging to Host
3. System behaviour analysis, see System Behavior Analysis with SEGGER SystemView
API Reference
Header File
• components/app_trace/include/esp_app_trace.h
Functions
esp_err_t esp_apptrace_init(void)
Initializes application tracing module.
Note Should be called before any esp_apptrace_xxx call.
Return ESP_OK on success, otherwise see esp_err_t
void esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size)
Configures down buffer.
Note Needs to be called before initiating any data transfer using esp_apptrace_buffer_get and
esp_apptrace_write. This function does not protect internal data by lock.
Parameters
• buf: Address of buffer to use for down channel (host to target) data.
• size: Size of the buffer.
uint8_t *esp_apptrace_buffer_get(esp_apptrace_dest_t dest, uint32_t size, uint32_t tmo)
Allocates buffer for trace data. After data in buffer are ready to be sent off esp_apptrace_buffer_put must be
called to indicate it.
Return non-NULL on success, otherwise NULL.
Parameters
• dest: Indicates HW interface to send data.
• size: Size of data to write to trace buffer.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
esp_err_t esp_apptrace_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t tmo)
Indicates that the data in buffer are ready to be sent off. This function is a counterpart of and must be preceeded
by esp_apptrace_buffer_get.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
Espressif Systems 790
Submit Document Feedback
Release v4.4