mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-24 16:25:17 +00:00
The old GCC ARM Embedded website on launchpad (https://launchpad.net/gcc-arm-embedded) has been superseeded by the new GNU Arm Embedded one (https://developer.arm.com/open-source/gnu-toolchain/gnu-rm). This also means a change of name from "GCC" to "GNU". Reflect this in the enviroment variables so that the proper term is used henceforth. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
26 lines
987 B
CMake
26 lines
987 B
CMake
# Until we completely deprecate it
|
|
if(NOT DEFINED ENV{GNUARMEMB_TOOLCHAIN_PATH})
|
|
if(DEFINED ENV{GCCARMEMB_TOOLCHAIN_PATH})
|
|
message(WARNING "GCCARMEMB_TOOLCHAIN_PATH is deprecated, please use GNUARMEMB_TOOLCHAIN_PATH instead")
|
|
set(GNUARMEMB_TOOLCHAIN_PATH $ENV{GCCARMEMB_TOOLCHAIN_PATH})
|
|
endif()
|
|
endif()
|
|
|
|
set_ifndef(GNUARMEMB_TOOLCHAIN_PATH "$ENV{GNUARMEMB_TOOLCHAIN_PATH}")
|
|
set( GNUARMEMB_TOOLCHAIN_PATH ${GNUARMEMB_TOOLCHAIN_PATH} CACHE PATH "gnuarmemb install directory")
|
|
assert( GNUARMEMB_TOOLCHAIN_PATH "GNUARMEMB_TOOLCHAIN_PATH is not set")
|
|
|
|
if(NOT EXISTS ${GNUARMEMB_TOOLCHAIN_PATH})
|
|
message(FATAL_ERROR "Nothing found at GNUARMEMB_TOOLCHAIN_PATH: '${GNUARMEMB_TOOLCHAIN_PATH}'")
|
|
endif()
|
|
|
|
set(TOOLCHAIN_HOME ${GNUARMEMB_TOOLCHAIN_PATH})
|
|
|
|
set(COMPILER gcc)
|
|
|
|
set(CROSS_COMPILE_TARGET arm-none-eabi)
|
|
set(SYSROOT_TARGET arm-none-eabi)
|
|
|
|
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
|
|
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
|