Support for Espressif SDK (ESP32, etc)
Three environment variables must be set to use this variant: export ZEPHYR_GCC_VARIANT="espressif" export ESP_IDF_PATH=/path/to/esp-idf export ESPRESSIF_TOOLCHAIN_PATH=/path/to/xtensa-esp32-elf/ ESP-IDF is the SDK provided by Espressif. It contains, among other things, the HAL and header files for registers and ROM functions used by the Zephyr port. At this stage, with the exception of the HAL library, none of the binary blobs provided by ESP-IDF are used. This can be obtained directly from Espressif, at <https://github.com/espressif/esp-idf>. Instructions on how to obtain the toolchain are detailed in the README for ESP-IDF. Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
parent
851b214af0
commit
bb19e08cde
1 changed files with 21 additions and 0 deletions
21
scripts/Makefile.toolchain.espressif
Normal file
21
scripts/Makefile.toolchain.espressif
Normal file
|
@ -0,0 +1,21 @@
|
|||
ifndef ESPRESSIF_TOOLCHAIN_PATH
|
||||
$(error ESPRESSIF_TOOLCHAIN_PATH is not set)
|
||||
endif
|
||||
|
||||
ifndef ESP_IDF_PATH
|
||||
$(error ESP_IDF_PATH is not set)
|
||||
endif
|
||||
|
||||
CROSS_COMPILE = ${ESPRESSIF_TOOLCHAIN_PATH}/bin/xtensa-esp32-elf-
|
||||
|
||||
TOOLCHAIN_LIBS = gcc hal
|
||||
LIBGCC_DIR = $(shell dirname `$(CROSS_COMPILE)gcc ${KBUILD_CFLAGS} -print-libgcc-file-name`)
|
||||
|
||||
LIB_INCLUDE_DIR += -L${ESP_IDF_PATH}/components/esp32 -L${LIBGCC_DIR}
|
||||
TOOLCHAIN_CFLAGS = -I${ESPRESSIF_TOOLCHAIN_PATH}/xtensa-esp32-elf/include
|
||||
|
||||
ZEPHYRINCLUDE += -I${ESP_IDF_PATH}/components/esp32/include
|
||||
ZEPHYRINCLUDE += -I${ESP_IDF_PATH}/components/soc/esp32/include
|
||||
|
||||
export CROSS_COMPILE TOOLCHAIN_LIBS TOOLCHAIN_CFLAGS LIB_INCLUDE_DIR
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue