]> granicus.if.org Git - esp-idf/commitdiff
freertos: place uxTopUsedPriority into DRAM
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 11 Sep 2017 12:15:27 +0000 (20:15 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 11 Sep 2017 12:15:27 +0000 (20:15 +0800)
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

index d74564495eafb449c13b5fe42eae2ce10d12f412..2367d8273cd84c9583f39f4fa4316564f136aace 100644 (file)
@@ -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