2018-08-03 23:11:23 +08:00
|
|
|
# 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})
|
2018-12-19 17:40:57 +08:00
|
|
|
message(FATAL_ERROR "Nothing found at GNUARMEMB_TOOLCHAIN_PATH: '${GNUARMEMB_TOOLCHAIN_PATH}'")
|
2018-08-03 23:11:23 +08:00
|
|
|
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})
|
2019-01-09 21:47:25 +08:00
|
|
|
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
|