2018-03-22 21:38:49 +08:00
|
|
|
set_ifndef(XTOOLS_TOOLCHAIN_PATH "$ENV{XTOOLS_TOOLCHAIN_PATH}")
|
2017-10-27 21:43:34 +08:00
|
|
|
set( XTOOLS_TOOLCHAIN_PATH ${XTOOLS_TOOLCHAIN_PATH} CACHE PATH "")
|
|
|
|
assert( XTOOLS_TOOLCHAIN_PATH "XTOOLS_TOOLCHAIN_PATH is not set")
|
|
|
|
|
|
|
|
set(TOOLCHAIN_HOME ${XTOOLS_TOOLCHAIN_PATH})
|
|
|
|
|
|
|
|
set(COMPILER gcc)
|
|
|
|
|
2018-04-30 20:29:30 +08:00
|
|
|
set(CROSS_COMPILE_TARGET_arm arm-zephyr-eabi)
|
2018-07-05 00:12:51 +08:00
|
|
|
if("${ARCH}" STREQUAL "x86")
|
|
|
|
if(CONFIG_X86_IAMCU)
|
2018-07-13 19:47:53 +08:00
|
|
|
set(CROSS_COMPILE_TARGET_x86 i586-zephyr-elfiamcu)
|
2018-07-05 00:12:51 +08:00
|
|
|
else()
|
2018-07-13 19:47:53 +08:00
|
|
|
set(CROSS_COMPILE_TARGET_x86 i586-zephyr-elf)
|
2018-07-05 00:12:51 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2018-04-30 20:29:30 +08:00
|
|
|
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)
|
2018-07-03 22:16:13 +08:00
|
|
|
set(CROSS_COMPILE_TARGET_arc arc-zephyr-elf)
|
2018-04-30 20:29:30 +08:00
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
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}-)
|
2018-07-04 05:03:26 +08:00
|
|
|
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|