1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 03:19:58 +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

@ -76,7 +76,7 @@ set(STM32F4_DEFINITIONS
)
function(target_stm32f4xx name startup ldscript)
target_stm32(${name} ${startup} ${ldscript} ${ARGN})
target_stm32(${name} ${startup} ${ldscript} OPENOCD_TARGET stm32f4x ${ARGN})
if (IS_RELEASE_BUILD)
target_compile_options(${name} PRIVATE "-O2")
target_link_options(${name} PRIVATE "-O2")