From d5085010c87a4f5223af0904a90bc2714a5a13d5 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Tue, 24 Mar 2020 22:47:34 +0800 Subject: [PATCH 1/2] soc: put hal function to get core id in IRAM --- components/soc/src/esp32/include/hal/cpu_ll.h | 4 +++- components/soc/src/esp32s2/include/hal/cpu_ll.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/soc/src/esp32/include/hal/cpu_ll.h b/components/soc/src/esp32/include/hal/cpu_ll.h index 180b615c71..f063576fb0 100644 --- a/components/soc/src/esp32/include/hal/cpu_ll.h +++ b/components/soc/src/esp32/include/hal/cpu_ll.h @@ -15,6 +15,8 @@ #include +#include "esp_attr.h" + #include "soc/cpu_caps.h" #include "xt_instr_macros.h" @@ -27,7 +29,7 @@ extern "C" { #endif -static inline int cpu_ll_get_core_id(void) +static inline int IRAM_ATTR cpu_ll_get_core_id(void) { uint32_t id; asm volatile ( diff --git a/components/soc/src/esp32s2/include/hal/cpu_ll.h b/components/soc/src/esp32s2/include/hal/cpu_ll.h index a0a002a3fb..cfcefc3dea 100644 --- a/components/soc/src/esp32s2/include/hal/cpu_ll.h +++ b/components/soc/src/esp32s2/include/hal/cpu_ll.h @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once - #include +#include "esp_attr.h" + #include "soc/cpu_caps.h" #include "xt_instr_macros.h" @@ -27,7 +28,7 @@ extern "C" { #endif -static inline int cpu_ll_get_core_id(void) +static inline int IRAM_ATTR cpu_ll_get_core_id(void) { return 0; } From b2fd9dd51c628e79fc9e166777c75025c533dcad Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Wed, 25 Mar 2020 10:00:06 +0800 Subject: [PATCH 2/2] ci: add basic startup test for when CONFIG_COMPILER_OPTIMIZATION_NONE=y --- tools/test_apps/system/startup/sdkconfig.ci.opt_o0 | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/test_apps/system/startup/sdkconfig.ci.opt_o0 diff --git a/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 b/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 new file mode 100644 index 0000000000..8c66af7708 --- /dev/null +++ b/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 @@ -0,0 +1 @@ +CONFIG_COMPILER_OPTIMIZATION_NONE=y