Skip to content

Commit df84cbc

Browse files
tejlmandnashif
authored andcommitted
cmake: use ZEPHYR_SDK_INSTALL_DIR instead of TOOLCHAIN_HOME
Zephyr SDK specifies TOOLCHAIN_HOME in cmake/zephyr/generic.cmake for use in Zephyr. But when specifying Zephyr SDK contolled variables isuch as SYSROOT_DIR or CROSS_COMPILE, then the Zephyr SDK should rightfully use ZEPHYR_SDK_INSTALL_DIR instead. The use of TOOLCHAIN_HOME stems from the time when the Zephyr SDK cmake code was present in the Zephyr repo and not part of the Zephyr SDK itself. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
1 parent 38f41da commit df84cbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/zephyr/target.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ set(CROSS_COMPILE_TARGET_sparc sparc-zephyr-elf)
2626
set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
2727
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
2828

29-
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
30-
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
29+
set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
30+
set(CROSS_COMPILE ${ZEPHYR_SDK_INSTALL_DIR}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
3131

3232
if("${ARCH}" STREQUAL "x86")
3333
if(CONFIG_X86_64)

0 commit comments

Comments
 (0)