diff options
author | lucas <luben93@gmail.com> | 2020-01-26 01:38:06 +0100 |
---|---|---|
committer | lucas <luben93@gmail.com> | 2020-01-26 01:38:06 +0100 |
commit | 37d50ed62bd3ff396ac37a23a923a6fcf0f25cad (patch) | |
tree | faf3ae1b1d93244cf4819f891ae3e78a8f8a528e /cmake-nRF5x/CMake_nRF5x.cmake | |
parent | 9dc4e32e36eb1167ee241cdf8027089cad593cf1 (diff) |
added some inital support for flashing via openocd instead of gdb, for wider compatability
Diffstat (limited to 'cmake-nRF5x/CMake_nRF5x.cmake')
-rwxr-xr-x | cmake-nRF5x/CMake_nRF5x.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake-nRF5x/CMake_nRF5x.cmake b/cmake-nRF5x/CMake_nRF5x.cmake index 0ecc60a3..4d0cb5da 100755 --- a/cmake-nRF5x/CMake_nRF5x.cmake +++ b/cmake-nRF5x/CMake_nRF5x.cmake @@ -401,6 +401,12 @@ macro(nRF5x_addExecutable EXECUTABLE_NAME SOURCE_FILES) COMMAND ${GDB_CLIENT_BIN_PATH} -nx --batch -ex 'target extended-remote ${GDB_CLIENT_TARGET_REMOTE}' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'load' -ex 'kill' ${EXECUTABLE_NAME}-full.hex COMMENT "flashing ${EXECUTABLE_NAME}-full.hex" ) + elseif(USE_OPENOCD_CLIENT) + add_custom_target("FLASH_MERGED_${EXECUTABLE_NAME}" + DEPENDS ${EXECUTABLE_NAME} + COMMAND /usr/bin/openocd -c "tcl_port disabled" -c "gdb_port 3333" -c "telnet_port 4444" -f /home/luben/code/Pinetime/pinetime.cfg -c "program \"${EXECUTABLE_NAME}-full.hex\"" -c reset -c shutdown + COMMENT "flashing ${EXECUTABLE_NAME}-full.hex" + ) endif() endif() |