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; } 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