Skip to content

Commit 40433c8

Browse files
committed
modules/trusted-firmware-m: Yet another work-around for SDK 0.18 dir change
SDK 0.18 adds a gratuitous subdirectory for gnu toolchains. To retain compatibility with older toolchains (which otherwise work fine), switch from using ${ZEPHYR_SDK_INSTALL_DIR} to ${TOOLCHAIN_HOME}, which 0.17 sets to ${ZEPHYR_SDK_INSTALL_DIR} and 0.18 sets to ${ZEPHYR_SDK_INSTALL_DIR}/gnu Signed-off-by: Keith Packard <[email protected]>
1 parent ccca6db commit 40433c8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,10 @@ if (CONFIG_BUILD_WITH_TFM)
219219
if(${ZEPHYR_TOOLCHAIN_VARIANT} STREQUAL "zephyr")
220220
set(TFM_TOOLCHAIN_FILE "toolchain_GNUARM.cmake")
221221
set(TFM_TOOLCHAIN_PREFIX "arm-zephyr-eabi")
222-
if(${TOOLCHAIN_VARIANT_COMPILER} STREQUAL "gnu")
223-
set(TFM_TOOLCHAIN_PATH ${ZEPHYR_SDK_INSTALL_DIR}/gnu/arm-zephyr-eabi/bin)
224-
elseif(${TOOLCHAIN_VARIANT_COMPILER} STREQUAL "llvm")
222+
if(${TOOLCHAIN_VARIANT_COMPILER} STREQUAL "llvm")
225223
set(TFM_TOOLCHAIN_PATH ${ZEPHYR_SDK_INSTALL_DIR}/llvm/bin)
226224
else()
227-
set(TFM_TOOLCHAIN_PATH ${ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin)
225+
set(TFM_TOOLCHAIN_PATH ${TOOLCHAIN_HOME}/arm-zephyr-eabi/bin)
228226
endif()
229227
elseif(${ZEPHYR_TOOLCHAIN_VARIANT} STREQUAL "gnuarmemb")
230228
set(TFM_TOOLCHAIN_FILE "toolchain_GNUARM.cmake")

0 commit comments

Comments
 (0)