Sebastian Bøe | 12f8f76 | 2017-10-27 15:43:34 +0200 | [diff] [blame] | 1 | set_ifndef(GCCARMEMB_TOOLCHAIN_PATH $ENV{GCCARMEMB_TOOLCHAIN_PATH}) |
| 2 | set( GCCARMEMB_TOOLCHAIN_PATH ${GCCARMEMB_TOOLCHAIN_PATH} CACHE PATH "gccarmemb install directory") |
| 3 | assert( GCCARMEMB_TOOLCHAIN_PATH "GCCARMEMB_TOOLCHAIN_PATH is not set") |
| 4 | |
| 5 | if(NOT EXISTS ${GCCARMEMB_TOOLCHAIN_PATH}) |
| 6 | message(FATAL_ERROR "Nothing found at GCCARMEMB_TOOLCHAIN_PATH: '${GCCARMEMB_TOOLCHAIN_PATH}'") |
| 7 | endif() |
| 8 | |
| 9 | set(TOOLCHAIN_HOME ${GCCARMEMB_TOOLCHAIN_PATH}) |
| 10 | |
| 11 | set(COMPILER gcc) |
| 12 | |
| 13 | set(CROSS_COMPILE_TARGET arm-none-eabi) |
| 14 | set(SYSROOT_TARGET arm-none-eabi) |
| 15 | |
| 16 | set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-) |
| 17 | set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}) |