diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-09-17 21:17:01 +0200 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2022-09-17 21:25:54 +0200 |
commit | 6ed8e983e96afea0fc42f06d43ff5927728d9f6b (patch) | |
tree | e8695771e8fbc6308db7183c3c5f4ebf7f66efb6 /src | |
parent | c853681d753c7ca8e2fe7bb22ca046f46ec47460 (diff) |
Remove CMake targets and corresponding CLI arguments that are specific to the debugging environment (USE_JLINK, USE_OPENOCD and USE_GDB_CLIENT).
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92f309a1..51390299 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1139,68 +1139,3 @@ if(BUILD_RESOURCES) add_subdirectory(resources) endif() - -# FLASH -if (USE_JLINK) - add_custom_target(FLASH_ERASE - COMMAND ${NRFJPROG} --eraseall -f ${NRF_TARGET} - COMMENT "erasing flashing" - ) - add_custom_target("FLASH_${EXECUTABLE_NAME}" - DEPENDS ${EXECUTABLE_NAME} - COMMAND ${NRFJPROG} --program ${EXECUTABLE_FILE_NAME}.hex -f ${NRF_TARGET} --sectorerase - COMMAND sleep 0.5s - COMMAND ${NRFJPROG} --reset -f ${NRF_TARGET} - COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex" - ) - -elseif (USE_GDB_CLIENT) - add_custom_target(FLASH_ERASE - COMMAND ${GDB_CLIENT_BIN_PATH} -nx --batch -ex 'target extended-remote ${GDB_CLIENT_TARGET_REMOTE}' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'mon erase_mass' - COMMENT "erasing flashing" - ) - add_custom_target("FLASH_${EXECUTABLE_NAME}" - DEPENDS ${EXECUTABLE_NAME} - 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_FILE_NAME}.hex - COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex" - ) -elseif (USE_OPENOCD) - if (USE_CMSIS_DAP) - add_custom_target(FLASH_ERASE - COMMAND ${OPENOCD_BIN_PATH} -c 'source [find interface/cmsis-dap.cfg]' -c 'transport select swd' - -c 'source [find target/nrf52.cfg]' - -c 'init' - -c 'halt' - -c 'nrf5 mass_erase' - -c 'halt' - -c 'reset' - -c 'exit' - COMMENT "erasing flashing" - ) - add_custom_target("FLASH_${EXECUTABLE_NAME}" - DEPENDS ${EXECUTABLE_NAME} - COMMAND ${OPENOCD_BIN_PATH} - -c 'tcl_port disabled' - -c 'gdb_port 3333' - -c 'telnet_port 4444' - -c 'source [find interface/cmsis-dap.cfg]' - -c 'transport select swd' - -c 'source [find target/nrf52.cfg]' - -c 'halt' - -c "program \"${EXECUTABLE_FILE_NAME}.hex\"" - -c 'reset' - -c 'shutdown' - COMMENT "flashing ${EXECUTABLE_BIN_NAME}.hex" - ) - else () - add_custom_target(FLASH_ERASE - COMMAND ${OPENOCD_BIN_PATH} -f interface/stlink.cfg -c 'transport select hla_swd' -f target/nrf52.cfg -c init -c halt -c 'nrf5 mass_erase' -c reset -c shutdown - COMMENT "erasing flashing" - ) - add_custom_target("FLASH_${EXECUTABLE_NAME}" - DEPENDS ${EXECUTABLE_NAME} - COMMAND ${OPENOCD_BIN_PATH} -c "tcl_port disabled" -c "gdb_port 3333" -c "telnet_port 4444" -f interface/stlink.cfg -c 'transport select hla_swd' -f target/nrf52.cfg -c "program \"${EXECUTABLE_FILE_NAME}.hex\"" -c reset -c shutdown - COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex" - ) - endif () -endif () |