Download pre-built toolchains (#2545)
* Download pre-built toolchains * Updated to include the platform in the name of the pre-built toolchain * Download archive into cache/ * Update Travis configuration to use pre-built toolchain via make
This commit is contained in:
parent
2d958750b5
commit
8bb41fe93f
|
@ -8,6 +8,7 @@ server-ca.crt
|
|||
luac.cross
|
||||
uz_unzip
|
||||
uz_zip
|
||||
tools/toolchains/
|
||||
|
||||
#ignore Eclipse project files
|
||||
.cproject
|
||||
|
|
|
@ -7,9 +7,6 @@ addons:
|
|||
cache:
|
||||
- directories:
|
||||
- cache
|
||||
install:
|
||||
- tar -Jxvf tools/esp-open-sdk.tar.xz
|
||||
- export PATH=$PATH:$PWD/esp-open-sdk/xtensa-lx106-elf/bin
|
||||
script:
|
||||
- export BUILD_DATE=$(date +%Y%m%d)
|
||||
- make EXTRA_CCFLAGS="-DBUILD_DATE='\"'$BUILD_DATE'\"'" all
|
||||
|
|
22
Makefile
22
Makefile
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
.NOTPARALLEL:
|
||||
|
||||
TOOLCHAIN_VERSION:=20181106.0
|
||||
|
||||
# SDK base version, as released by Espressif
|
||||
SDK_BASE_VER:=2.2.1
|
||||
|
||||
|
@ -73,11 +75,13 @@ ifeq ($(OS),Windows_NT)
|
|||
else
|
||||
# We are under other system, may be Linux. Assume using gcc.
|
||||
# Can we use -fdata-sections?
|
||||
PLATFORM:=linux-x86_64
|
||||
ifndef COMPORT
|
||||
ESPPORT = /dev/ttyUSB0
|
||||
else
|
||||
ESPPORT = $(COMPORT)
|
||||
endif
|
||||
export PATH := $(PATH):$(TOP_DIR)/tools/toolchains/esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION)/bin/
|
||||
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections
|
||||
AR = xtensa-lx106-elf-ar
|
||||
CC = $(WRAPCC) xtensa-lx106-elf-gcc
|
||||
|
@ -204,16 +208,32 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out
|
|||
# Should be done in top-level makefile only
|
||||
#
|
||||
|
||||
all: sdk_pruned pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
|
||||
all: toolchain sdk_pruned pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
|
||||
|
||||
.PHONY: sdk_extracted
|
||||
.PHONY: sdk_patched
|
||||
.PHONY: sdk_pruned
|
||||
.PHONY: toolchain
|
||||
|
||||
sdk_extracted: $(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER)
|
||||
sdk_patched: sdk_extracted $(TOP_DIR)/sdk/.patched-$(SDK_VER)
|
||||
sdk_pruned: $(SDK_DIR_DEPENDS) $(TOP_DIR)/sdk/.pruned-$(SDK_VER)
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
toolchain:
|
||||
else
|
||||
toolchain: $(TOP_DIR)/tools/toolchains/esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION)/bin/xtensa-lx106-elf-gcc
|
||||
|
||||
$(TOP_DIR)/tools/toolchains/esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION)/bin/xtensa-lx106-elf-gcc: $(TOP_DIR)/cache/toolchain-esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION).tar.xz
|
||||
mkdir -p $(TOP_DIR)/tools/toolchains/
|
||||
tar -xJf $< -C $(TOP_DIR)/tools/toolchains/
|
||||
touch $@
|
||||
|
||||
$(TOP_DIR)/cache/toolchain-esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION).tar.xz:
|
||||
mkdir -p $(TOP_DIR)/cache
|
||||
wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused https://github.com/jmattsson/esp-toolchains/releases/download/$(PLATFORM)-$(TOOLCHAIN_VERSION)/toolchain-esp8266-$(PLATFORM)-$(TOOLCHAIN_VERSION).tar.xz -O $@ || { rm -f "$@"; exit 1; }
|
||||
endif
|
||||
|
||||
$(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER): $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip
|
||||
mkdir -p "$(dir $@)"
|
||||
(cd "$(dir $@)" && rm -fr esp_iot_sdk_v$(SDK_VER) ESP8266_NONOS_SDK-$(SDK_BASE_VER) && unzip $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip ESP8266_NONOS_SDK-$(SDK_BASE_VER)/lib/* ESP8266_NONOS_SDK-$(SDK_BASE_VER)/ld/eagle.rom.addr.v6.ld ESP8266_NONOS_SDK-$(SDK_BASE_VER)/include/* ESP8266_NONOS_SDK-$(SDK_BASE_VER)/bin/esp_init_data_default_v05.bin)
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue