mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-19 14:08:38 +08:00
Merge branch 'sam_rtos_debugging' into sam_testing
This commit is contained in:
Vendored
+1
@@ -11,6 +11,7 @@
|
||||
"request": "launch",
|
||||
"name": "Debug ODrive",
|
||||
"executable": "${workspaceRoot}/build/ODriveFirmware.elf",
|
||||
"rtos": "FreeRTOS",
|
||||
"configFiles": [
|
||||
"interface/stlink-v2.cfg",
|
||||
"target/stm32f4x_stlink.cfg",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define USED __attribute__((used))
|
||||
#else
|
||||
#define USED
|
||||
#endif
|
||||
|
||||
const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1;
|
||||
@@ -90,6 +90,7 @@ LDFLAGS += '-T'..boarddir..'/STM32F405RGTx_FLASH.ld'
|
||||
LDFLAGS += '-L'..boarddir..'/Drivers/CMSIS/Lib' -- lib dir
|
||||
LDFLAGS += '-lc -lm -lnosys -larm_cortexM4lf_math' -- libs
|
||||
LDFLAGS += '-mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nosys.specs -specs=nano.specs -u _printf_float -u _scanf_float -Wl,--cref -Wl,--gc-sections'
|
||||
LDFLAGS += '-Wl,--undefined=uxTopUsedPriority'
|
||||
|
||||
|
||||
-- common flags for ASM, C and C++
|
||||
@@ -147,7 +148,8 @@ build{
|
||||
'MotorControl/encoder.cpp',
|
||||
'MotorControl/controller.cpp',
|
||||
'MotorControl/sensorless_estimator.cpp',
|
||||
'MotorControl/main.cpp'
|
||||
'MotorControl/main.cpp',
|
||||
'FreeRTOS-openocd.c'
|
||||
},
|
||||
includes={
|
||||
'Drivers/DRV8301',
|
||||
|
||||
Reference in New Issue
Block a user