1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 14:25:16 +03:00

[BUILD] Add support for openocd helpers with cmake

- Add openocd_<target>: runs openocd for the target
- Add openocd_flash_<target>: flashes the target using openocd.
 It works with both an already running openocd instance as well
 as launching its own one. Uses a helper tool that requires python.
- Add openocd_cfg_<target>: generates openocd config for target. Used
 for generating an openocd config automatically when launching
 a debug session from an IDE.
This commit is contained in:
Alberto García Hierro 2020-07-13 21:25:23 +01:00
parent fb9f61a583
commit d6177e6933
10 changed files with 211 additions and 11 deletions

View file

@ -60,7 +60,7 @@ set(STM32F303_DEFINITIONS
function(target_stm32f3xx name startup ldscript)
# F3 targets don't support MSC
target_stm32(${name} ${startup} ${ldscript} DISABLE_MSC ${ARGN})
target_stm32(${name} ${startup} ${ldscript} DISABLE_MSC OPENOCD_TARGET stm32f3x ${ARGN})
# F3 targets don't use -O2 to save size
if (IS_RELEASE_BUILD)
target_compile_options(${name} PRIVATE "-Os")