diff --git a/components/freertos/include/freertos/portable.h b/components/freertos/include/freertos/portable.h index 45eaf7396..a628cf031 100644 --- a/components/freertos/include/freertos/portable.h +++ b/components/freertos/include/freertos/portable.h @@ -197,7 +197,7 @@ BaseType_t xPortInIsrContext(); #endif /* Multi-core: get current core ID */ -static inline uint32_t xPortGetCoreID() { +static inline uint32_t IRAM_ATTR xPortGetCoreID() { int id; asm volatile( "rsr.prid %0\n" diff --git a/components/freertos/include/freertos/portmacro.h b/components/freertos/include/freertos/portmacro.h index a909b329a..b74766283 100644 --- a/components/freertos/include/freertos/portmacro.h +++ b/components/freertos/include/freertos/portmacro.h @@ -121,6 +121,7 @@ typedef unsigned portBASE_TYPE UBaseType_t; #include "portbenchmark.h" #include "sdkconfig.h" +#include "esp_attr.h" #define portFIRST_TASK_HOOK CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG