Skip to content

Commit fbeb034

Browse files
committed
Adding support for 0.18 zephyr sdk
* Changes have been partly taken from here: zephyrproject-rtos/zephyr@15c3776#diff-529decabf18d860968a987c34f75a7102c007194f1ee3a845fd6016b9b7538f7 * This is needed because of change to the folder structure: Old: opt/zephyr-sdk/arm-zephyr-eabi New: opt/zephyr-sdk/gnu/arm-zephyr-eabi opt/zephyr-sdk/llvm/arm-zephyr-eabi This structure has been adapet from the zephyr toolchain install script. Signed-off-by: Sebastian Wezel <[email protected]>
1 parent 4789325 commit fbeb034

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed

cmake/modules/FindHostTools.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ zephyr_file(APPLICATION_ROOT TOOLCHAIN_ROOT)
9696

9797
# Host-tools don't unconditionally set TOOLCHAIN_HOME anymore,
9898
# but in case Zephyr's SDK toolchain is used, set TOOLCHAIN_HOME
99-
if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "zephyr")
99+
if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "zephyr-gnu")
100100
set(TOOLCHAIN_HOME ${HOST_TOOLS_HOME})
101101
endif()
102102

cmake/modules/FindZephyr-sdk.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ endif()
5454
# 1) Zephyr specified as toolchain (ZEPHYR_SDK_INSTALL_DIR still used if defined)
5555
# 2) No toolchain specified == Default to Zephyr toolchain
5656
# Until we completely deprecate it
57-
if(("zephyr" STREQUAL ${ZEPHYR_TOOLCHAIN_VARIANT}) OR
57+
if(("zephyr-gnu" STREQUAL ${ZEPHYR_TOOLCHAIN_VARIANT}) OR
5858
(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT) OR
5959
(DEFINED ZEPHYR_SDK_INSTALL_DIR) OR
6060
(Zephyr-sdk_FIND_REQUIRED))

cmake/toolchain/zephyr/generic.cmake renamed to cmake/toolchain/zephyr-gnu/generic.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/generic.cmake)
3+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/generic.cmake)
44

55
set(TOOLCHAIN_KCONFIG_DIR ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr)
66

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/target.cmake)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/llvm/generic.cmake)
4+
5+
set(TOOLCHAIN_KCONFIG_DIR ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr)
6+
7+
message(STATUS "Found toolchain: zephyr ${SDK_VERSION} (${ZEPHYR_SDK_INSTALL_DIR})")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/llvm/target.cmake)

cmake/toolchain/zephyr/target.cmake

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)