diff --git a/.gitignore b/.gitignore index db872fac..57fca5e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ sdk/ +cache/ diff --git a/.travis.yml b/.travis.yml index 7d34f845..e55f87bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ addons: packages: - python-serial - srecord +cache: + directories: + - cache install: - tar -zxvf tools/esp-open-sdk.tar.gz - export PATH=$PATH:$PWD/esp-open-sdk/xtensa-lx106-elf/bin diff --git a/Makefile b/Makefile index b06333e6..4c2793b1 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ # SDK version NodeMCU is locked to SDK_VER:=1.5.1 +SDK_FILE_VER:=$(SDK_VER)_16_01_08 +SDK_FILE_ID:=1046 +SDK_FILE_SIZE:=2185752 # Ensure we search "our" SDK before the tool-chain's SDK (if any) TOP_DIR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST)))) SDK_DIR:=$(TOP_DIR)/sdk/esp_iot_sdk_v$(SDK_VER) @@ -171,14 +174,20 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out all: sdk_extracted .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS) .PHONY: sdk_extracted + sdk_extracted: $(TOP_DIR)/sdk/.extracted-$(SDK_VER) -$(TOP_DIR)/sdk/.extracted-$(SDK_VER): +$(TOP_DIR)/sdk/.extracted-$(SDK_VER): $(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_FILE_VER).zip mkdir -p "$(dir $@)" (cd "$(dir $@)" && unzip $(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_VER)*.zip esp_iot_sdk_v$(SDK_VER)/lib/* esp_iot_sdk_v$(SDK_VER)/ld/eagle.rom.addr.v6.ld esp_iot_sdk_v$(SDK_VER)/include/* ) rm -f $(SDK_DIR)/lib/liblwip.a touch $@ +$(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_FILE_VER).zip: + mkdir -p "$(dir $@)" + wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused http://bbs.espressif.com/download/file.php?id=$(SDK_FILE_ID) -O $@ || { rm -f "$@"; exit 1; } + [ `wc -c < "$@"` -eq $(SDK_FILE_SIZE) ] || { rm -f "$@"; exit 1; } + clean: $(foreach d, $(SUBDIRS), $(MAKE) -C $(d) clean;) $(RM) -r $(ODIR)/$(TARGET)/$(FLAVOR) diff --git a/app/include/user_version.h b/app/include/user_version.h index 32aa362a..7fb7d949 100644 --- a/app/include/user_version.h +++ b/app/include/user_version.h @@ -3,7 +3,7 @@ #define NODE_VERSION_MAJOR 1U #define NODE_VERSION_MINOR 5U -#define NODE_VERSION_REVISION 0U +#define NODE_VERSION_REVISION 1U #define NODE_VERSION_INTERNAL 0U #define NODE_VERSION "NodeMCU 1.5.1" diff --git a/cache/esp_iot_sdk_v1.5.1_16_01_08.zip b/cache/esp_iot_sdk_v1.5.1_16_01_08.zip deleted file mode 100644 index 0e6e4e32..00000000 Binary files a/cache/esp_iot_sdk_v1.5.1_16_01_08.zip and /dev/null differ