Chapter 2. API Reference
• dest: Indicates HW interface to send data. Should be identical to the same parameter in call to
esp_apptrace_buffer_get.
• ptr:
Address of trace buffer to release.
esp_apptrace_buffer_get.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
esp_err_t esp_apptrace_write(esp_apptrace_dest_t
Writes data to trace buffer.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
• dest: Indicates HW interface to send data.
• data: Address of data to write to trace buffer.
• size: Size of data to write to trace buffer.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
int
esp_apptrace_vprintf_to(esp_apptrace_dest_t
vprintf-like function to sent log messages to host via specified HW interface.
Return Number of bytes written.
Parameters
• dest: Indicates HW interface to send data.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
• fmt: Address of format string.
• ap: List of arguments.
int esp_apptrace_vprintf(const char *fmt, va_list ap)
vprintf-like function to sent log messages to host.
Return Number of bytes written.
Parameters
• fmt: Address of format string.
• ap: List of arguments.
esp_err_t esp_apptrace_flush(esp_apptrace_dest_t
Flushes remaining data in trace buffer to host.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
• dest: Indicates HW interface to flush data on.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
esp_err_t esp_apptrace_flush_nolock(esp_apptrace_dest_t
Flushes remaining data in trace buffer to host without locking internal data. This is special version of
esp_apptrace_flush which should be called from panic handler.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
• dest: Indicates HW interface to flush data on.
• min_sz: Threshold for flushing data. If current filling level is above this value, data will be flushed.
TRAX destinations only.
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
esp_err_t esp_apptrace_read(esp_apptrace_dest_t
Reads host data from trace buffer.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
• dest: Indicates HW interface to read the data on.
• data: Address of buffer to put data from trace buffer.
• size: Pointer to store size of read data. Before call to this function pointed memory must hold
requested size of data
• tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
Espressif Systems
dest, const void *data, uint32_t size, uint32_t
tmo)
dest, uint32_t tmo, const char *fmt, va_list ap)
dest, uint32_t tmo)
dest, void *data, uint32_t *size, uint32_t tmo)
791
Submit Document Feedback
Should be the value returned by call to
dest, uint32_t min_sz, uint32_t tmo)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers