Skip to content

Commit 835ff89

Browse files
carlocaionegalak
authored andcommitted
cmake: arm64: Bail out if the old SDK is used
After the ARM/ARM64 split the SDK 0.12.4 is needed to be able to compile the ARM64 arch code. Bail out if an old SDK is detected at compile time. Also change the minimal supported Zephyr SDK to v0.12, as agreed in Toolchain WG. Main reason is added compiler architectures and important inclusion of fixes, for example qemu and arm fixes for veneers (TFM) Signed-off-by: Carlo Caione <[email protected]>
1 parent 2b0a481 commit 835ff89

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cmake/verify-toolchain.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
# FORMAT=json: Print the output as a json formatted string, useful for Python
1717

1818
# This is the minimum required Zephyr-SDK version which supports CMake package
19-
set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.11.3)
19+
if("${ARCH}" STREQUAL "arm64")
20+
set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12.4)
21+
else()
22+
set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12)
23+
endif()
2024

2125
# Set internal variables if set in environment.
2226
if(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT)
@@ -67,12 +71,12 @@ if(("zephyr" STREQUAL ${ZEPHYR_TOOLCHAIN_VARIANT}) OR
6771
# To support Zephyr SDK tools (DTC, and other tools) with 3rd party toolchains
6872
# then we keep track of current toolchain variant.
6973
set(ZEPHYR_CURRENT_TOOLCHAIN_VARIANT ${ZEPHYR_TOOLCHAIN_VARIANT})
70-
find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} QUIET HINTS $ENV{ZEPHYR_SDK_INSTALL_DIR})
74+
find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} REQUIRED QUIET HINTS $ENV{ZEPHYR_SDK_INSTALL_DIR})
7175
if(DEFINED ZEPHYR_CURRENT_TOOLCHAIN_VARIANT)
7276
set(ZEPHYR_TOOLCHAIN_VARIANT ${ZEPHYR_CURRENT_TOOLCHAIN_VARIANT})
7377
endif()
7478
else()
75-
find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} QUIET PATHS
79+
find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} REQUIRED QUIET PATHS
7680
/usr
7781
/usr/local
7882
/opt

0 commit comments

Comments
 (0)