From 23d7dd8b8ea719e56bb1d905a988751a7ecd1ce3 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 11 Sep 2017 20:15:27 +0800 Subject: [PATCH] freertos: place uxTopUsedPriority into DRAM When debugging crashes caused by flash cache access errors, OpenOCD may request the value of uxTopUsedPriority when cache is disabled. Placing it into IRAM to avoid an error in such case. --- components/freertos/FreeRTOS-openocd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/freertos/FreeRTOS-openocd.c b/components/freertos/FreeRTOS-openocd.c index d74564495..2367d8273 100644 --- a/components/freertos/FreeRTOS-openocd.c +++ b/components/freertos/FreeRTOS-openocd.c @@ -10,6 +10,7 @@ */ #include "FreeRTOS.h" +#include "esp_attr.h" #include "sdkconfig.h" #ifdef __GNUC__ @@ -19,5 +20,5 @@ #endif #ifdef CONFIG_ESP32_DEBUG_OCDAWARE -const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1; -#endif \ No newline at end of file +const int USED DRAM_ATTR uxTopUsedPriority = configMAX_PRIORITIES - 1; +#endif