From 0bfe08578b7a30180e357343d12f2bdfcbb7ff53 Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Fri, 6 Jan 2017 17:19:09 +0800 Subject: [PATCH 1/2] Add sdkconfig include to cpu_util.h so CONFIG_ESP32_DEBUG_OCDAWARE actually resolves --- components/esp32/cpu_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp32/cpu_util.c b/components/esp32/cpu_util.c index e3b4ef8f16..ecfcab4baf 100644 --- a/components/esp32/cpu_util.c +++ b/components/esp32/cpu_util.c @@ -16,6 +16,7 @@ #include "soc/cpu.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" +#include "sdkconfig.h" void IRAM_ATTR esp_cpu_stall(int cpu_id) { From 11a994d5d8c5d479ab436010ed20db59f11e16d1 Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Mon, 9 Jan 2017 12:04:21 +0800 Subject: [PATCH 2/2] Calling esp_intr_noniram_[en|dis]able twice is an error, so abort instead of doing an assert which disappears in non-debug mode --- components/esp32/intr_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/intr_alloc.c b/components/esp32/intr_alloc.c index 9476a433d4..4fdda2f396 100644 --- a/components/esp32/intr_alloc.c +++ b/components/esp32/intr_alloc.c @@ -691,7 +691,7 @@ void esp_intr_noniram_disable() int oldint; int cpu=xPortGetCoreID(); int intmask=~non_iram_int_mask[cpu]; - assert(non_iram_int_disabled_flag[cpu]==false); + if (non_iram_int_disabled_flag[cpu]) abort(); non_iram_int_disabled_flag[cpu]=true; asm volatile ( "movi %0,0\n" @@ -709,7 +709,7 @@ void esp_intr_noniram_enable() { int cpu=xPortGetCoreID(); int intmask=non_iram_int_disabled[cpu]; - assert(non_iram_int_disabled_flag[cpu]==true); + if (!non_iram_int_disabled_flag[cpu]) abort(); non_iram_int_disabled_flag[cpu]=false; asm volatile ( "movi a3,0\n"