diff --git a/cmake/flash/CMakeLists.txt b/cmake/flash/CMakeLists.txt index 4898fd0ecf6..a8a6bbbf30d 100644 --- a/cmake/flash/CMakeLists.txt +++ b/cmake/flash/CMakeLists.txt @@ -6,7 +6,8 @@ list(APPEND ENV_VARS KERNEL_BIN_NAME=${KERNEL_BIN_NAME} ARCH=${ARCH} BOARD_NAME=${BOARD} - GDB=${CMAKE_GDB} + GDB=${CMAKE_GDB} + OPENOCD=${OPENOCD} ) foreach(target flash debug debugserver) diff --git a/cmake/host-tools.cmake b/cmake/host-tools.cmake index 222cffaebf0..43d5139c279 100644 --- a/cmake/host-tools.cmake +++ b/cmake/host-tools.cmake @@ -38,6 +38,12 @@ find_program( mconf ) +# openocd is an optional dependency +find_program( + OPENOCD + openocd + ) + # qemu is an optional dependency if("${ARCH}" STREQUAL "x86") set(QEMU_binary_suffix i386)