2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2018-03-22 21:38:49 +08:00
|
|
|
set_ifndef(ESPRESSIF_TOOLCHAIN_PATH "$ENV{ESPRESSIF_TOOLCHAIN_PATH}")
|
2017-10-27 21:43:34 +08:00
|
|
|
set( ESPRESSIF_TOOLCHAIN_PATH ${ESPRESSIF_TOOLCHAIN_PATH} CACHE PATH "")
|
|
|
|
assert( ESPRESSIF_TOOLCHAIN_PATH "ESPRESSIF_TOOLCHAIN_PATH is not set")
|
|
|
|
|
|
|
|
set(TOOLCHAIN_HOME ${ESPRESSIF_TOOLCHAIN_PATH})
|
|
|
|
|
|
|
|
set(COMPILER gcc)
|
2019-04-25 20:22:00 +08:00
|
|
|
set(LINKER ld)
|
cmake: Toolchain abstraction: Abstraction of binary tools, foundation.
This forms the foundation for the abstraction of the binary tools,
where the following steps are taken:
- Move binary tool resolving, such as objcopy, objdump, readelf and
so forth, out of compiler definitions and place in a dedicated binary
tools folder with the binary tools supplier as subfolder, similar to
the compiler and linker directories.
- Create binary tool sets, gnu, host-gnu and llvm.
- Each toolchain selects the required set of binary tools by setting
BINTOOLS via its generic.cmake as it also does for compiler and linker.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
2019-07-18 21:06:51 +08:00
|
|
|
set(BINTOOLS gnu)
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
set(CROSS_COMPILE_TARGET xtensa-esp32-elf)
|
|
|
|
set(SYSROOT_TARGET xtensa-esp32-elf)
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
2020-03-06 06:20:59 +08:00
|
|
|
message(STATUS "Found toolchain: espressif (${ESPRESSIF_TOOLCHAIN_PATH})")
|