Skip to content

Commit

Permalink
sdk: add support for 0.10.1 and remove 0.9.5
Browse files Browse the repository at this point in the history
Add support for Zephyr SDK 0.10.1 and remove old 0.9.5 which does not
work with the master tree.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Jun 11, 2019
1 parent 8ba5b73 commit 8e2b9b4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# SPDX-License-Identifier: Apache-2.0

set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR})

set(COMPILER gcc)
set(LINKER ld)

set(CROSS_COMPILE_TARGET i586-${TOOLCHAIN_VENDOR}-elf)
set(SYSROOT_TARGET i586-${TOOLCHAIN_VENDOR}-elf)

set(CROSS_COMPILE ${TOOLCHAIN_HOME}/usr/bin/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_TARGET}-)
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${SYSROOT_TARGET}/usr)
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

if(MINGW)
set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
else()
set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
endif()
set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)

# Path used for searching by the find_*() functions, with appropriate
# suffixes added. Ensures that the SDK's host tools will be found when
Expand Down
32 changes: 32 additions & 0 deletions cmake/toolchain/zephyr/0.10.1/target.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: Apache-2.0

# Determine if we have an IAMCU toolchain or not.
if(CONFIG_X86_IAMCU)
set(CROSS_COMPILE_TARGET_x86 i586-zephyr-elfiamcu)
else()
set(CROSS_COMPILE_TARGET_x86 i586-zephyr-elf)
endif()

set(CROSS_COMPILE_TARGET_arm arm-zephyr-eabi)
set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf)
set(CROSS_COMPILE_TARGET_riscv32 riscv32-zephyr-elf)
set(CROSS_COMPILE_TARGET_mips mipsel-zephyr-elf)
set(CROSS_COMPILE_TARGET_xtensa xtensa-zephyr-elf)
set(CROSS_COMPILE_TARGET_arc arc-zephyr-elf)

set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})

set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)

if("${ARCH}" STREQUAL "xtensa")
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
set(TOOLCHAIN_INCLUDES
${SYSROOT_DIR}/include/arch/include
${SYSROOT_DIR}/include
)

LIST(APPEND TOOLCHAIN_LIBS hal)
LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
endif()
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
34 changes: 0 additions & 34 deletions cmake/toolchain/zephyr/0.9.5/target.cmake

This file was deleted.

0 comments on commit 8e2b9b4

Please sign in to comment.