Chapter 2. API Reference
Return ESP_OK.
Parameters
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinetly.
int esp_sysview_vprintf(const char *format, va_list args)
vprintf-like function to sent log messages to the host.
Return Number of bytes written.
Parameters
• format: Address of format string.
• args: List of arguments.
esp_err_t esp_sysview_heap_trace_start(uint32_t tmo)
Starts SystemView heap tracing.
Return ESP_OK on success, ESP_ERR_TIMEOUT if operation has been timed out.
Parameters
• tmo: Timeout (in us) to wait for the host to be connected. Use -1 to wait forever.
esp_err_t esp_sysview_heap_trace_stop(void)
Stops SystemView heap tracing.
Return ESP_OK.
void esp_sysview_heap_trace_alloc(void *addr, uint32_t size, const void *callers)
Sends heap allocation event to the host.
Parameters
• addr: Address of allocated block.
• size: Size of allocated block.
• callers: Pointer to array with callstack addresses. Array size must be CON-
FIG_HEAP_TRACING_STACK_DEPTH.
void esp_sysview_heap_trace_free(void *addr, const void *callers)
Sends heap de-allocation event to the host.
Parameters
• addr: Address of de-allocated block.
• callers: Pointer to array with callstack addresses. Array size must be CON-
FIG_HEAP_TRACING_STACK_DEPTH.
2.6.3 The Async memcpy API
Overview
ESP32-S2 has a DMA engine which can help to offload internal memory copy operations from the CPU in a asyn-
chronous way.
The async memcpy API wraps all DMA configurations and operations, the signature of esp_async_memcpy()
is almost the same to the standard libc one.
Thanks to the benefit of the DMA, we don’t have to wait for each memory copy to be done before we issue another
memcpy request. By the way, it’s still possible to know when memcpy is finished by listening in the memcpy callback
function.
Note: Memory copy from/to external PSRAM is not supported on ESP32-S2, esp_async_memcpy() will abort
returning an error if buffer address is not in SRAM.
Espressif Systems 794
Submit Document Feedback
Release v4.4