1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_get(GNUARMEMB_TOOLCHAIN_PATH)
4assert(    GNUARMEMB_TOOLCHAIN_PATH "GNUARMEMB_TOOLCHAIN_PATH is not set")
5
6if(NOT EXISTS ${GNUARMEMB_TOOLCHAIN_PATH})
7  message(FATAL_ERROR "Nothing found at GNUARMEMB_TOOLCHAIN_PATH: '${GNUARMEMB_TOOLCHAIN_PATH}'")
8endif()
9
10set(TOOLCHAIN_HOME ${GNUARMEMB_TOOLCHAIN_PATH})
11
12set(COMPILER gcc)
13set(LINKER ld)
14set(BINTOOLS gnu)
15
16set(CROSS_COMPILE_TARGET arm-none-eabi)
17set(SYSROOT_TARGET       arm-none-eabi)
18
19set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
20set(SYSROOT_DIR   ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
21set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
22
23message(STATUS "Found toolchain: gnuarmemb (${GNUARMEMB_TOOLCHAIN_PATH})")
24