mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
esp32: Adds functionality for application tracing over JTAG
- Implements application tracing module which allows to send arbitrary data to host over JTAG. This feature is useful for analyzing program modules behavior, dumping run-time application data etc. - Implements printf-like logging functions on top of apptrace module. This feature is a kind of semihosted printf functionality with lower overhead and impact on system behaviour as compared to standard printf.
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
#include "esp_coexist.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_core_dump.h"
|
||||
#include "esp_app_trace.h"
|
||||
#include "trax.h"
|
||||
|
||||
#define STRINGIFY(s) STRINGIFY2(s)
|
||||
@@ -221,6 +222,12 @@ void start_cpu0_default(void)
|
||||
_GLOBAL_REENT->_stdin = (FILE*) &__sf_fake_stdin;
|
||||
_GLOBAL_REENT->_stdout = (FILE*) &__sf_fake_stdout;
|
||||
_GLOBAL_REENT->_stderr = (FILE*) &__sf_fake_stderr;
|
||||
#endif
|
||||
#if CONFIG_ESP32_APPTRACE_ENABLE
|
||||
esp_err_t err = esp_apptrace_init();
|
||||
if (err != ESP_OK) {
|
||||
ESP_EARLY_LOGE(TAG, "Failed to init apptrace module on CPU0 (%d)!", err);
|
||||
}
|
||||
#endif
|
||||
do_global_ctors();
|
||||
#if CONFIG_INT_WDT
|
||||
@@ -252,6 +259,12 @@ void start_cpu1_default(void)
|
||||
{
|
||||
#if CONFIG_ESP32_TRAX_TWOBANKS
|
||||
trax_start_trace(TRAX_DOWNCOUNT_WORDS);
|
||||
#endif
|
||||
#if CONFIG_ESP32_APPTRACE_ENABLE
|
||||
esp_err_t err = esp_apptrace_init();
|
||||
if (err != ESP_OK) {
|
||||
ESP_EARLY_LOGE(TAG, "Failed to init apptrace module on CPU1 (%d)!", err);
|
||||
}
|
||||
#endif
|
||||
// Wait for FreeRTOS initialization to finish on PRO CPU
|
||||
while (port_xSchedulerRunning[0] == 0) {
|
||||
|
Reference in New Issue
Block a user