diff --git a/.gitmodules b/.gitmodules index 054baa12d4..6b1e9f7c40 100644 --- a/.gitmodules +++ b/.gitmodules @@ -45,3 +45,7 @@ path = Sming/Libraries/Adafruit_SSD1306 url = https://github.com/adafruit/Adafruit_SSD1306.git ignore = dirty +[submodule "Sming/third-party/ESP8266_NONOS_SDK"] + path = Sming/third-party/ESP8266_NONOS_SDK + url = https://github.com/espressif/ESP8266_NONOS_SDK.git + ignore = dirty diff --git a/.travis.yml b/.travis.yml index 2d6c6ba0e4..0c14a61b41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ matrix: env: SDK_VERSION=1.5.0 - os: linux env: SDK_VERSION=2.0.0 + - os: linux + env: SDK_VERSION=2.1.0 git: submodules: false @@ -34,7 +36,7 @@ install: - mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk - if [ "$SDK_VERSION" != "2.0.0" ]; then wget https://bintray.com/artifact/download/kireevco/generic/${SDK_FILE_NAME}; fi - if [ "$SDK_VERSION" != "2.0.0" ]; then bsdtar -xf ${SDK_FILE_NAME} -C $TRAVIS_BUILD_DIR/opt/esp-alt-sdk; fi - - if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then wget https://github.com/nodemcu/nodemcu-firmware/raw/master/tools/esp-open-sdk.tar.xz; tar -Jxvf esp-open-sdk.tar.xz; ln -s `pwd`/esp-open-sdk/xtensa-lx106-elf $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/. ; fi + - if [[ ( "$SDK_VERSION" == "2.0.0" || "$SDK_VERSION" == "2.1.0" ) && "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/nodemcu/nodemcu-firmware/raw/master/tools/esp-open-sdk.tar.xz; tar -Jxvf esp-open-sdk.tar.xz; ln -s `pwd`/esp-open-sdk/xtensa-lx106-elf $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/. ; fi - if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://bbs.espressif.com/download/file.php?id=1690 -O sdk.zip; unzip sdk.zip; ln -s `pwd`/ESP8266_NONOS_SDK/ $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/sdk; export DEPLOY='true'; fi script: @@ -42,6 +44,7 @@ script: - export CHANGED_PROJECTS=`for i in $CHANGED_FILES; do echo "$i" | grep '^samples/' | cut -d'/' -f2; done | uniq` - export SMING_HOME=$TRAVIS_BUILD_DIR/Sming - export ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-alt-sdk + - if [ "$SDK_VERSION" == "2.1.0" ]; then export SDK_BASE=$(SMING_HOME)/third-party/ESP8266_NONOS_SDK; fi - export PATH=$PATH:$ESP_HOME/xtensa-lx106-elf/bin:$ESP_HOME/utils/:$SMING_HOME/../.travis/tools - cd $SMING_HOME - make test diff --git a/Sming/Makefile b/Sming/Makefile index 1cfb9db6d2..7ae4885dd2 100644 --- a/Sming/Makefile +++ b/Sming/Makefile @@ -173,11 +173,16 @@ THIRD_PARTY_DATA += third-party/http-parser/Makefile MODULES += third-party/http-parser/ EXTRA_INCDIR += third-party/http-parser/ -# => webscoket-parser +# => websocket-parser THIRD_PARTY_DATA += third-party/ws_parser/Makefile MODULES += third-party/ws_parser/ EXTRA_INCDIR += third-party/ws_parser/ +# => SDK +ifneq (,$(findstring third-party/ESP8266_NONOS_SDK, $(SDK_BASE))) + THIRD_PARTY_DATA += third-party/ESP8266_NONOS_SDK/Makefile +endif + # => esp-gdbstub ifeq ($(ENABLE_GDB), 1) THIRD_PARTY_DATA += third-party/esp-gdbstub/Makefile diff --git a/Sming/third-party/.patches/ESP8266_NONOS_SDK.patch b/Sming/third-party/.patches/ESP8266_NONOS_SDK.patch new file mode 100644 index 0000000000..1b0e3351ed --- /dev/null +++ b/Sming/third-party/.patches/ESP8266_NONOS_SDK.patch @@ -0,0 +1,13 @@ +diff --git a/include/osapi.h b/include/osapi.h +index 0462a9c..52ad21f 100644 +--- a/include/osapi.h ++++ b/include/osapi.h +@@ -30,7 +30,7 @@ + #include "user_config.h" + + void ets_bzero(void *s, size_t n); +-void ets_delay_us(uint16_t us); ++void ets_delay_us(uint32_t us); + void ets_install_putc1(void (*p)(char c)); + + #define os_bzero ets_bzero diff --git a/Sming/third-party/ESP8266_NONOS_SDK b/Sming/third-party/ESP8266_NONOS_SDK new file mode 160000 index 0000000000..61248df5f6 --- /dev/null +++ b/Sming/third-party/ESP8266_NONOS_SDK @@ -0,0 +1 @@ +Subproject commit 61248df5f6d45d130313b412f7492f581fd4cadf