Skip to content

Commit 9e3521c

Browse files
Manu3l0usstephanosio
authored andcommitted
Set correct OPENOCD_DEFAULT_PATH for Windows
On Windows platform, the OPENOCD_DEFAULT_PATH is not set in line with Zephyr documentation. Fixes zephyrproject-rtos/zephyr#79051. Signed-off-by: Manuel Aebischer <manuel.aebischer@belden.com>
1 parent 82a34a6 commit 9e3521c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/zephyr/host-tools.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ list(APPEND CMAKE_PREFIX_PATH ${HOST_TOOLS_HOME}/usr)
1010

1111
# TODO: Use find_* somehow for these as well?
1212
set_ifndef(QEMU_BIOS ${HOST_TOOLS_HOME}/usr/share/qemu)
13-
set_ifndef(OPENOCD_DEFAULT_PATH ${HOST_TOOLS_HOME}/usr/share/openocd/scripts)
13+
if (WIN32)
14+
set_ifndef(OPENOCD_DEFAULT_PATH $ENV{ProgramFiles}/OpenOCD/share/openocd/scripts)
15+
else ()
16+
set_ifndef(OPENOCD_DEFAULT_PATH ${HOST_TOOLS_HOME}/usr/share/openocd/scripts)
17+
endif ()

0 commit comments

Comments
 (0)