瀏覽代碼

Add files I forgot (FreeRTOS-openocd.c and panic.h)

Jeroen Domburg 9 年之前
父節點
當前提交
a44c45e63e
共有 2 個文件被更改,包括 30 次插入0 次删除
  1. 23 0
      components/freertos/FreeRTOS-openocd.c
  2. 7 0
      components/freertos/include/freertos/panic.h

+ 23 - 0
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

+ 7 - 0
components/freertos/include/freertos/panic.h

@@ -0,0 +1,7 @@
+#ifndef PANIC_H
+#define PANIC_H
+
+void setBreakpointIfJtag(void *fn);
+
+
+#endif