From a44c45e63ee30f6d10fe043f13e56f50d084bddd Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Wed, 24 Aug 2016 17:21:27 +0800 Subject: [PATCH] Add files I forgot (FreeRTOS-openocd.c and panic.h) --- components/freertos/FreeRTOS-openocd.c | 23 ++++++++++++++++++++ components/freertos/include/freertos/panic.h | 7 ++++++ 2 files changed, 30 insertions(+) create mode 100644 components/freertos/FreeRTOS-openocd.c create mode 100644 components/freertos/include/freertos/panic.h diff --git a/components/freertos/FreeRTOS-openocd.c b/components/freertos/FreeRTOS-openocd.c new file mode 100644 index 0000000000..6177f02057 --- /dev/null +++ b/components/freertos/FreeRTOS-openocd.c @@ -0,0 +1,23 @@ +/* + * 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 "sdkconfig.h" + +#ifdef __GNUC__ +#define USED __attribute__((used)) +#else +#define USED +#endif + +#ifdef CONFIG_FREERTOS_DEBUG_OCDAWARE +const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1; +#endif \ No newline at end of file diff --git a/components/freertos/include/freertos/panic.h b/components/freertos/include/freertos/panic.h new file mode 100644 index 0000000000..9e902ed20b --- /dev/null +++ b/components/freertos/include/freertos/panic.h @@ -0,0 +1,7 @@ +#ifndef PANIC_H +#define PANIC_H + +void setBreakpointIfJtag(void *fn); + + +#endif \ No newline at end of file