From 4bc53d44e3de267651d4f499782065f41d09fcdd Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Fri, 14 Feb 2020 15:03:22 +0500 Subject: [PATCH] xtensa: use early logging for trax config during startup --- components/xtensa/debug_helpers.c | 2 ++ components/xtensa/trax.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/xtensa/debug_helpers.c b/components/xtensa/debug_helpers.c index 06c7f9b23..788f2b8c1 100644 --- a/components/xtensa/debug_helpers.c +++ b/components/xtensa/debug_helpers.c @@ -20,6 +20,8 @@ #include "soc/soc_memory_layout.h" #include "soc/cpu.h" +#include "sdkconfig.h" + #if CONFIG_IDF_TARGET_ESP32 #include "esp32/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32S2 diff --git a/components/xtensa/trax.c b/components/xtensa/trax.c index 725e677d4..0bddcb341 100644 --- a/components/xtensa/trax.c +++ b/components/xtensa/trax.c @@ -30,12 +30,12 @@ static const char* TAG = "trax"; int trax_start_trace(trax_downcount_unit_t units_until_stop) { #if !WITH_TRAX - ESP_LOGE(TAG, "Trax_start_trace called, but trax is disabled in menuconfig!"); + ESP_EARLY_LOGE(TAG, "Trax_start_trace called, but trax is disabled in menuconfig!"); return ESP_ERR_NO_MEM; #endif uint32_t v; if (eri_read(ERI_TRAX_TRAXSTAT)&TRAXSTAT_TRACT) { - ESP_LOGI(TAG, "Stopping active trace first."); + ESP_EARLY_LOGI(TAG, "Stopping active trace first."); //Trace is active. Stop trace. eri_write(ERI_TRAX_DELAYCNT, 0); eri_write(ERI_TRAX_TRAXCTRL, eri_read(ERI_TRAX_TRAXCTRL)|TRAXCTRL_TRSTP); @@ -54,7 +54,7 @@ int trax_start_trace(trax_downcount_unit_t units_until_stop) int trax_trigger_traceend_after_delay(int delay) { #if !WITH_TRAX - ESP_LOGE(TAG, "Trax_trigger_traceend_after_delay called, but trax is disabled in menuconfig!"); + ESP_EARLY_LOGE(TAG, "Trax_trigger_traceend_after_delay called, but trax is disabled in menuconfig!"); return ESP_ERR_NO_MEM; #endif eri_write(ERI_TRAX_DELAYCNT, delay);