Skip to content

Commit

Permalink
Added the latest SDK as part of the distribution.
Browse files Browse the repository at this point in the history
In order to use it make sure to set SDK_BASE to $(SMING_HOME)/third-party/ESP8266_NONOS_SDK.
  • Loading branch information
slav-at-attachix committed Nov 5, 2017
1 parent db0b4e4 commit 66c61ca
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,14 +36,15 @@ 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:
- export CHANGED_FILES=`git diff --diff-filter=AMD HEAD HEAD^ --name-only`
- 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
Expand Down
7 changes: 6 additions & 1 deletion Sming/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions Sming/third-party/.patches/ESP8266_NONOS_SDK.patch
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions Sming/third-party/ESP8266_NONOS_SDK
Submodule ESP8266_NONOS_SDK added at 61248d

0 comments on commit 66c61ca

Please sign in to comment.