mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
64bce3ce59
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.
25 lines
685 B
C
25 lines
685 B
C
/*
|
|
* Since at least FreeRTOS V7.5.3 uxTopUsedPriority is no longer
|
|
* present in the kernel, so it has to be supplied by other means for
|
|
* OpenOCD's threads awareness.
|
|
*
|
|
* Add this file to your project, and, if you're using --gc-sections,
|
|
* ``--undefined=uxTopUsedPriority'' (or
|
|
* ``-Wl,--undefined=uxTopUsedPriority'' when using gcc for final
|
|
* linking) to your LDFLAGS; same with all the other symbols you need.
|
|
*/
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "esp_attr.h"
|
|
#include "sdkconfig.h"
|
|
|
|
#ifdef __GNUC__
|
|
#define USED __attribute__((used))
|
|
#else
|
|
#define USED
|
|
#endif
|
|
|
|
#ifdef CONFIG_ESP32_DEBUG_OCDAWARE
|
|
const int USED DRAM_ATTR uxTopUsedPriority = configMAX_PRIORITIES - 1;
|
|
#endif
|