1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_get(ESPRESSIF_TOOLCHAIN_PATH) 4assert( ESPRESSIF_TOOLCHAIN_PATH "ESPRESSIF_TOOLCHAIN_PATH is not set") 5 6set(COMPILER gcc) 7set(LINKER ld) 8set(BINTOOLS gnu) 9 10set(CROSS_COMPILE_TARGET_xtensa_esp32 xtensa-esp32-elf) 11set(CROSS_COMPILE_TARGET_xtensa_esp32s2 xtensa-esp32s2-elf) 12set(CROSS_COMPILE_TARGET_xtensa_esp32s3 xtensa-esp32s3-elf) 13set(CROSS_COMPILE_TARGET_riscv_esp32c3 riscv32-esp-elf) 14 15set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}_${CONFIG_SOC_SERIES}}) 16set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET}) 17 18if(ESPRESSIF_DEPRECATED_PATH) 19 set(TOOLCHAIN_HOME ${ESPRESSIF_TOOLCHAIN_PATH}) 20else() 21 set(TOOLCHAIN_HOME ${ESPRESSIF_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}) 22endif() 23 24set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-) 25set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}) 26 27set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib") 28 29message(STATUS "Found toolchain: espressif (${ESPRESSIF_TOOLCHAIN_PATH})") 30