freertos: make sure xPortGetCoreID is placed into IRAM

In some cases, xPortGetCoreID was not inlined, and ended up in flash.
Since this function is used in many situations when cache is disabled,
that caused exceptions. Adding IRAM attribute to fix that.
pull/846/merge
Ivan Grokhotkov 2017-08-29 08:25:41 +08:00
rodzic 3161854efb
commit eb1b4f971b
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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"

Wyświetl plik

@ -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