Skip to content

Commit

Permalink
Merge commit 'f8f675415c36dd4d8da45cfc3669f50469c65d8d' into develop
Browse files Browse the repository at this point in the history
* commit 'f8f675415c36dd4d8da45cfc3669f50469c65d8d':
  Preparation for release 3.5.0. (SmingHub#1295)
  Added Stream::indexOf(char c) that finds a character in a stream (SmingHub#1290)
  Made spiffs_mount() compatible with rBoot. (SmingHub#1292)
  Added experimental support for SDK 2.1 (SmingHub#1264)
  Initial test code for improved sendPing and sendPong. (SmingHub#1270)
  Added experimental support for LWIP v2 (SmingHub#1289)
  Fixed ssl memory leaks related to SSL context not being freed (SmingHub#1288)
  Fixed an error breaking SSL session resumption, Http Connection reuse and Http pipelining. (SmingHub#1287)
  Added Adafruit_BME280 Library (SmingHub#1286)
  Allow immediate server deletion if there are no active connections. (SmingHub#1285)
  Deleting an HttpClient should result in freeing the total memory it uses.
  Allow shutting down of TcpServers (SmingHub#1284)
  TcpConnection fixes related to ssl extensions. Styling fixes for HttpClient.
  fix/MemoryLeak(Heap) during TCP Client connection and delete
  Reverted: m_printf: stacksize reduced SmingHub#1097. (SmingHub#1279)
  Preparation for release 3.4.0. (SmingHub#1277)
  Mqtt memory fix: Fix copy and paste error (SmingHub#1276)
  Fix Memory Leak in Mqtt (SmingHub#1273)
  Changed a TcpClient message to be less confusing. (SmingHub#1271)
  • Loading branch information
johndoe8967 committed Dec 18, 2017
2 parents 43ecff1 + f8f6754 commit f29fe93
Show file tree
Hide file tree
Showing 106 changed files with 825 additions and 304 deletions.
22 changes: 19 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "Sming/rboot"]
[submodule "Sming/third-party/rboot"]
path = Sming/third-party/rboot
url = https://github.com/raburton/rboot.git
ignore = dirty
Expand All @@ -10,11 +10,11 @@
path = Sming/third-party/esp-gdbstub
url = https://github.com/espressif/esp-gdbstub.git
ignore = dirty
[submodule "Sming/pwm"]
[submodule "Sming/third-party/pwm"]
path = Sming/third-party/pwm
url = https://github.com/StefanBruens/ESP8266_new_pwm.git
ignore = dirty
[submodule "third-party/axtls-8266"]
[submodule "Sming/third-party/axtls-8266"]
path = Sming/third-party/axtls-8266
url = https://github.com/igrr/axtls-8266.git
ignore = dirty
Expand Down Expand Up @@ -45,3 +45,19 @@
path = Sming/Libraries/Adafruit_SSD1306
url = https://github.com/adafruit/Adafruit_SSD1306.git
ignore = dirty
[submodule "Sming/Libraries/Adafruit_BME280_Library"]
path = Sming/Libraries/Adafruit_BME280_Library
url = https://github.com/adafruit/Adafruit_BME280_Library.git
ignore = dirty
[submodule "Sming/Libraries/Adafruit_Sensor"]
path = Sming/Libraries/Adafruit_Sensor
url = https://github.com/adafruit/Adafruit_Sensor
ignore = dirty
[submodule "Sming/third-party/lwip2"]
path = Sming/third-party/lwip2
url = https://github.com/d-a-v/esp82xx-nonos-linklayer.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
14 changes: 9 additions & 5 deletions .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 @@ -29,19 +31,20 @@ addons:
- graphviz

install:
- if [ "$SDK_VERSION" != "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-macos-x86_64.zip"; fi
- if [ "$SDK_VERSION" != "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-linux-x86_64.tar.gz"; fi
- if [ "$SDK_VERSION" == "1.5.0" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-macos-x86_64.zip"; fi
- if [ "$SDK_VERSION" == "1.5.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-linux-x86_64.tar.gz"; fi
- 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" == "1.5.0" ]; then wget https://bintray.com/artifact/download/kireevco/generic/${SDK_FILE_NAME}; fi
- if [ "$SDK_VERSION" == "1.5.0" ]; then bsdtar -xf ${SDK_FILE_NAME} -C $TRAVIS_BUILD_DIR/opt/esp-alt-sdk; fi
- if [[ "$SDK_VERSION" != "1.5.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 All @@ -56,6 +59,7 @@ script:
- make clean samples-clean
- make ENABLE_CUSTOM_HEAP=1
- make Basic_Blink ENABLE_CUSTOM_HEAP=1
- make dist-clean; make HttpServer_ConfigNetwork ENABLE_CUSTOM_LWIP=2

deploy:
provider: script
Expand Down
33 changes: 24 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SDK = Software Development Kit
n/a = The selected SDK is not available on that OS

## Latest Stable Release
- [Sming V3.3.0](https://github.com/SmingHub/Sming/releases/tag/3.3.0)
- [Sming V3.5.0](https://github.com/SmingHub/Sming/releases/tag/3.5.0)

## Getting started
- [Windows](https://github.com/SmingHub/Sming/wiki/Windows-Quickstart)
Expand All @@ -59,17 +59,32 @@ n/a = The selected SDK is not available on that OS

<details><summary>There are multiple custom features that can be enabled by default. For example: SSL support, custom LWIP, open PWM, custom heap allocation, more verbose debugging, etc. Click here to see the details</summary><p>

- Custom LWIP: (default: ON) By default we are using custom compiled LWIP stack instead of the binary one provided from Espressif. This is increasing the free memory and decreasing the space on the flash. All espconn_* functions are turned off by default. If your application requires the use of some of the espconn_* functions then add the ENABLE_ESPCONN=1 directive. See `Makefile-user.mk` from the [Basic_SmartConfig](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_SmartConfig/Makefile-user.mk#L41) application for examples. If you would like to use the binary LWIP then you should turn off the custom LWIP compilation by providing `ENABLE_CUSTOM_LWIP=0`.
- SSL: (default: OFF) The SSL support is not built-in by default to conserve resources. If you want to enable it then take a look at the [Readme](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_Ssl/README.md) in the Basic_Ssl samples.
- Custom PWM: (default: ON) If you don't want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with `ENABLE_CUSTOM_PWM=0`. There is no need to recompile the Sming library.
- **Custom LWIP**: (default: ON) By default we are using custom compiled LWIP stack instead of the binary one provided from Espressif. This is increasing the free memory and decreasing the space on the flash. All espconn_* functions are turned off by default. If your application requires the use of some of the espconn_* functions then add the ENABLE_ESPCONN=1 directive. See `Makefile-user.mk` from the [Basic_SmartConfig](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_SmartConfig/Makefile-user.mk#L41) application for examples. If you would like to use the binary LWIP then you should turn off the custom LWIP compilation by providing `ENABLE_CUSTOM_LWIP=0`.
- **LWIP 2**: (default: OFF) LWIP 2 stands for LightWeight IP stack, version 2. In order to enable that feature you should (re)compile the Sming library AND your application using the following directive ENABLE_CUSTOM_LWIP=2. LWIP v2 does not have support for espconn_* functions.
This feature is still **experimental** which means that we still do not recommend it in production.
- **SSL support**: (default: OFF) The SSL support is not built-in by default to conserve resources. If you want to enable it then take a look at the [Readme](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_Ssl/README.md) in the Basic_Ssl samples.
- **Custom PWM**: (default: ON) If you don't want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with `ENABLE_CUSTOM_PWM=0`. There is no need to recompile the Sming library.
- WPS: (default: OFF) The WPS support (Wi-Fi Protected Setup) is not activated by default to preserve resources. To enable WPS, use the switch ENABLE_WPS=1 for compiling Sming.
- Custom serial baud rate: (default: OFF) The default serial baud rate is 115200. If you want to change it to a higher baud rate you can recompile Sming and your application changing the `COM_SPEED_SERIAL` directive. For example `COM_SPEED_SERIAL=921600`.
- Custom heap allocation: (default: OFF) If your application is experiencing heap fragmentation then you can try the [umm_malloc](https://github.com/rhempel/umm_malloc) heap allocation. To enable it compile Sming with `ENABLE_CUSTOM_HEAP=1`. In order to use it in your sample/application make sure to compile the sample with `ENABLE_CUSTOM_HEAP=1`. **Do not enable custom heap allocation and -mforce-l32 compiler flag together**.
- Debug information log level and format: There are four debug levels: debug=3, info=2, warn=1, error=0. Using `DEBUG_VERBOSE_LEVEL` you can set the desired level (0-3). For example `DEBUG_VERBOSE_LEVEL=2` will show only info messages and above. Another make directive is `DEBUG_PRINT_FILENAME_AND_LINE=1` which enables printing the filename and line number of every debug line. This will require extra space on flash. Note: you can compile the Sming library with a set of debug directives and your project with another settings, this way you can control debugging separately for Sming and your application code.
- Debug information for custom LWIP: If you use custom LWIP (see above) some debug information will be printed for critical errors and situations. You can enable debug information printing altogether using `ENABLE_LWIPDEBUG=1`. To increase debugging for certain areas you can modify debug options in `third-party/esp-open-lwip/include/lwipopts.h`.
- Interactive debugging on the device: (default: OFF) In order to be able to debug live directly on the ESP8266 microcontroller you should re-compile your application and the Sming library with `ENABLE_GDB=1` directive. See [Basic_Debug](https://github.com/SmingHub/Sming/tree/develop/samples/Basic_Debug) sample for more details.
- **Custom serial baud rate**: (default: OFF) The default serial baud rate is 115200. If you want to change it to a higher baud rate you can recompile Sming and your application changing the `COM_SPEED_SERIAL` directive. For example `COM_SPEED_SERIAL=921600`.
- **Custom heap allocation**: (default: OFF) If your application is experiencing heap fragmentation then you can try the [umm_malloc](https://github.com/rhempel/umm_malloc) heap allocation. To enable it compile Sming with `ENABLE_CUSTOM_HEAP=1`. In order to use it in your sample/application make sure to compile the sample with `ENABLE_CUSTOM_HEAP=1`. **Do not enable custom heap allocation and -mforce-l32 compiler flag at the same time**.
- **Debug information log level and format**: There are four debug levels: debug=3, info=2, warn=1, error=0. Using `DEBUG_VERBOSE_LEVEL` you can set the desired level (0-3). For example `DEBUG_VERBOSE_LEVEL=2` will show only info messages and above. Another make directive is `DEBUG_PRINT_FILENAME_AND_LINE=1` which enables printing the filename and line number of every debug line. This will require extra space on flash. Note: you can compile the Sming library with a set of debug directives and your project with another settings, this way you can control debugging separately for Sming and your application code.
- **Debug information for custom LWIP**: If you use custom LWIP (see above) some debug information will be printed for critical errors and situations. You can enable debug information printing altogether using `ENABLE_LWIPDEBUG=1`. To increase debugging for certain areas you can modify debug options in `third-party/esp-open-lwip/include/lwipopts.h`.
- **Interactive debugging on the device**: (default: OFF) In order to be able to debug live directly on the ESP8266 microcontroller you should re-compile your application and the Sming library with `ENABLE_GDB=1` directive. See [Basic_Debug](https://github.com/SmingHub/Sming/tree/develop/samples/Basic_Debug) sample for more details.
- CommandExecutor feature: (default: ON) This feature enables execution of certain commands by registering token handlers for text received via serial, websocket or telnet connection. If this feature is not used additional RAM/Flash can be obtained by setting `ENABLE_CMD_EXECUTOR=0`. This will save ~1KB RAM and ~3KB of flash memory.
- **SDK 2.1.0+**: (default: OFF) In order to use SDK 2.1 you should set one environment variable before (re)compiling Sming AND applications based on it. The variable is SDK_BASE and it should point to `$SMING_HOME/third-party/ESP8266_NONOS_SDK`.

For Windows you need to do:
```
set SDK_BASE %SMING_HOME%//third-party/ESP8266_NONOS_SDK
```

For Linux(bash) you need to do:
```
export SDK_BASE="$SMING_HOME/third-party/ESP8266_NONOS_SDK"
```

Read the comments from [this URL](https://github.com/SmingHub/Sming/pull/1264) for known issues.
This feature is still **experimental** which means that we still do not recommend it in production.
</p></details>

## Compilation and flashing
Expand Down
1 change: 1 addition & 0 deletions Sming/Libraries/Adafruit_BME280_Library
1 change: 1 addition & 0 deletions Sming/Libraries/Adafruit_Sensor
Submodule Adafruit_Sensor added at e985f2
33 changes: 29 additions & 4 deletions Sming/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,17 @@ 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
CFLAGS += -DSDK_INTERNAL
endif

# => esp-gdbstub
ifeq ($(ENABLE_GDB), 1)
THIRD_PARTY_DATA += third-party/esp-gdbstub/Makefile
Expand All @@ -199,9 +205,23 @@ endif
LIBLWIP = lwip
ENABLE_CUSTOM_LWIP ?= 1
ENABLE_ESPCONN ?= 0
ifeq ($(ENABLE_CUSTOM_LWIP), 0)
EXTRA_INCDIR += system/esp-lwip
endif
ifeq ($(ENABLE_CUSTOM_LWIP), 1)
THIRD_PARTY_DATA += third-party/esp-open-lwip/Makefile.open
EXTRA_INCDIR += third-party/esp-open-lwip/include
LIBLWIP = lwip_open
LWIP_EXTRA_FLAGS = 1
endif
ifeq ($(ENABLE_CUSTOM_LWIP), 2)
THIRD_PARTY_DATA += third-party/lwip2/Makefile.sming
EXTRA_INCDIR += third-party/lwip2/glue-esp/include-esp third-party/lwip2/include
LIBLWIP = lwip2
LWIP_EXTRA_FLAGS = 1
endif

ifeq ($(LWIP_EXTRA_FLAGS),1)
EXTRA_CFLAGS_LWIP = -I../../system/include -I../../Wiring
ENABLE_LWIPDEBUG ?= 0
ifeq ($(ENABLE_LWIPDEBUG), 1)
Expand All @@ -210,8 +230,6 @@ ifeq ($(ENABLE_CUSTOM_LWIP), 1)

ifeq ($(ENABLE_ESPCONN), 1)
LIBLWIP = lwip_full
else
LIBLWIP = lwip_open
endif
CUSTOM_TARGETS += $(USER_LIBDIR)/lib$(LIBLWIP).a
endif
Expand All @@ -228,7 +246,7 @@ endif
MFORCE32 := $(shell $(CC) --help=target | grep mforce-l32)

# compiler flags using during compilation of source files. Add '-pg' for debugging
CFLAGS = -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections \
CFLAGS += -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections \
-D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) -DENABLE_CMD_EXECUTOR=$(ENABLE_CMD_EXECUTOR) -DESP8266=1
ifeq ($(SMING_RELEASE),1)
# See: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Expand Down Expand Up @@ -384,6 +402,10 @@ ifeq ($(ENABLE_CUSTOM_LWIP), 1)
$(USER_LIBDIR)/liblwip_%.a: third-party/esp-open-lwip/Makefile.open
$(Q) $(MAKE) -C third-party/esp-open-lwip/ -f Makefile.open ENABLE_ESPCONN=$(ENABLE_ESPCONN) SDK_BASE="$(SDK_BASE)" USER_LIBDIR="$(SMING_HOME)/$(USER_LIBDIR)/" CFLAGS_EXTRA="$(EXTRA_CFLAGS_LWIP)" all
endif
ifeq ($(ENABLE_CUSTOM_LWIP), 2)
$(USER_LIBDIR)/liblwip%.a: third-party/lwip2/Makefile.sming
$(Q) $(MAKE) -C third-party/lwip2/ -f Makefile.sming ENABLE_ESPCONN=$(ENABLE_ESPCONN) SDK_BASE="$(SDK_BASE)" USER_LIBDIR="$(SMING_HOME)/$(USER_LIBDIR)/" CFLAGS_EXTRA="$(EXTRA_CFLAGS_LWIP)" all
endif

spiffy: spiffy/spiffy

Expand Down Expand Up @@ -429,6 +451,9 @@ endif
ifeq ($(ENABLE_CUSTOM_LWIP), 1)
$(Q) -$(MAKE) -C third-party/esp-open-lwip/ -f Makefile.open ENABLE_ESPCONN=$(ENABLE_ESPCONN) SDK_BASE="$(SDK_BASE)" USER_LIBDIR="$(SMING_HOME)/$(USER_LIBDIR)/" CFLAGS_EXTRA="$(EXTRA_CFLAGS_LWIP)" clean
endif
ifeq ($(ENABLE_CUSTOM_LWIP), 2)
$(Q) -$(MAKE) -C third-party/lwip2/ -f Makefile.sming ENABLE_ESPCONN=$(ENABLE_ESPCONN) SDK_BASE="$(SDK_BASE)" USER_LIBDIR="$(SMING_HOME)/$(USER_LIBDIR)/" CFLAGS_EXTRA="$(EXTRA_CFLAGS_LWIP)" clean
endif

test: Basic_Blink Basic_rBoot Basic_Ssl Basic_HwPWM

Expand Down
22 changes: 18 additions & 4 deletions Sming/Makefile-project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ MODULES ?= app # default to app if not set by user
EXTRA_INCDIR ?= include # default to include if not set by user

ENABLE_CUSTOM_LWIP ?= 1
LWIP_INCDIR = $(SMING_HOME)/system/esp-lwip/lwip/include
ifeq ($(ENABLE_CUSTOM_LWIP), 1)
LWIP_INCDIR = $(SMING_HOME)/third-party/esp-open-lwip/include
else ifeq ($(ENABLE_CUSTOM_LWIP), 2)
LWIP_INCDIR = $(SMING_HOME)/third-party/lwip2/glue-esp/include-esp $(SMING_HOME)/third-party/lwip2/include
endif

EXTRA_INCDIR += $(SMING_HOME)/include $(SMING_HOME)/ $(LWIP_INCDIR) $(SMING_HOME)/system/include \
Expand All @@ -200,6 +203,13 @@ ifeq ($(ENABLE_CUSTOM_LWIP), 1)
endif
CUSTOM_TARGETS += $(USER_LIBDIR)/lib$(LIBLWIP).a
endif
ifeq ($(ENABLE_CUSTOM_LWIP), 2)
ifeq ($(ENABLE_ESPCONN), 1)
$(error LWIP2 does not support espconn_* functions. Make sure to set ENABLE_CUSTOM_LWIP to 0 or 1.)
endif
LIBLWIP = lwip2
CUSTOM_TARGETS += $(USER_LIBDIR)/liblwip2.a
endif

LIBPWM = pwm

Expand All @@ -217,6 +227,10 @@ endif

# compiler flags using during compilation of source files
CFLAGS = -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) $(USER_CFLAGS) -DENABLE_CMD_EXECUTOR=$(ENABLE_CMD_EXECUTOR)
# => SDK
ifneq (,$(findstring third-party/ESP8266_NONOS_SDK, $(SDK_BASE)))
CFLAGS += -DSDK_INTERNAL
endif
ifeq ($(SMING_RELEASE),1)
# See: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
# for full list of optimization options
Expand Down Expand Up @@ -457,10 +471,10 @@ $(USER_LIBDIR)/libpwm_open.a:
$(Q) $(MAKE) -C $(SMING_HOME) compiler/lib/libpwm_open.a ENABLE_CUSTOM_PWM=1
endif

ifeq ($(ENABLE_CUSTOM_LWIP), 1)
$(USER_LIBDIR)/liblwip_%.a:
$(Q) $(MAKE) -C $(SMING_HOME) compiler/lib/$(notdir $@) ENABLE_CUSTOM_LWIP=1 ENABLE_ESPCONN=$(ENABLE_ESPCONN)
endif
$(USER_LIBDIR)/liblwip%.a:
$(Q) $(MAKE) -C $(SMING_HOME) compiler/lib/$(notdir $@) \
ENABLE_CUSTOM_LWIP=$(ENABLE_CUSTOM_LWIP) \
ENABLE_ESPCONN=$(ENABLE_ESPCONN)

checkdirs: $(BUILD_DIR) $(FW_BASE) $(CUSTOM_TARGETS)

Expand Down
Loading

0 comments on commit f29fe93

Please sign in to comment.