From 08ad0f81946b55a3a76c50d2aa2fe949b04ff30e Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Thu, 20 Feb 2020 15:03:08 +0500 Subject: [PATCH] esp_system: remove usage of CONFIG_FREERTOS_UNICORE from panic handler --- components/esp_system/port/panic_handler.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_system/port/panic_handler.c b/components/esp_system/port/panic_handler.c index 4e28a92e00..0b2a904664 100644 --- a/components/esp_system/port/panic_handler.c +++ b/components/esp_system/port/panic_handler.c @@ -111,7 +111,7 @@ static void print_debug_exception_details(const void *f) #if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK int core = 0; -#if !CONFIG_FREERTOS_UNICORE +#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE if (f == xt_exc_frames[1]) { core = 1; } @@ -209,11 +209,11 @@ static void print_registers(const void *f, int core) // If the core which triggers the interrupt watchpoint was in ISR context, dump the epc registers. if (xPortInterruptedFromISRContext() -#if !CONFIG_FREERTOS_UNICORE +#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE && ((core == 0 && frame->exccause == PANIC_RSN_INTWDT_CPU0) || (core == 1 && frame->exccause == PANIC_RSN_INTWDT_CPU1)) -#endif //!CONFIG_FREERTOS_UNICORE - ) { +#endif //!CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE + ) { panic_print_str("\r\n"); @@ -251,7 +251,7 @@ static void print_state_for_core(const void *f, int core) static void print_state(const void *f) { -#if !CONFIG_FREERTOS_UNICORE +#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE int err_core = f == xt_exc_frames[0] ? 0 : 1; #else int err_core = 0; @@ -261,7 +261,7 @@ static void print_state(const void *f) panic_print_str("\r\n"); -#if !CONFIG_FREERTOS_UNICORE +#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE // If there are other frame info, print them as well for (int i = 0; i < SOC_CPU_CORES_NUM; i++) { // `f` is the frame for the offending core, see note above. @@ -478,7 +478,7 @@ static void panic_handler(XtExcFrame *frame, bool pseudo_excause) // If multiple cores arrive at panic handler, save frames for all of them xt_exc_frames[core_id] = frame; -#if !CONFIG_FREERTOS_UNICORE +#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE // These are cases where both CPUs both go into panic handler. The following code ensures // only one core proceeds to the system panic handler. if (pseudo_excause) {