FreeRTOS-openocd.c 821 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Since at least FreeRTOS V7.5.3 uxTopUsedPriority is no longer
  7. * present in the kernel, so it has to be supplied by other means for
  8. * OpenOCD's threads awareness.
  9. *
  10. * Add this file to your project, and, if you're using --gc-sections,
  11. * ``--undefined=uxTopUsedPriority'' (or
  12. * ``-Wl,--undefined=uxTopUsedPriority'' when using gcc for final
  13. * linking) to your LDFLAGS; same with all the other symbols you need.
  14. */
  15. #include "FreeRTOS.h"
  16. #include "esp_attr.h"
  17. #include "sdkconfig.h"
  18. #ifdef __GNUC__
  19. #define USED __attribute__((used))
  20. #else
  21. #define USED
  22. #endif
  23. #ifdef CONFIG_FREERTOS_DEBUG_OCDAWARE
  24. const int USED DRAM_ATTR uxTopUsedPriority = configMAX_PRIORITIES - 1; //will be removed
  25. #endif