Skip to content

Commit

Permalink
Release 4.1.0.
Browse files Browse the repository at this point in the history
New features
------------------
- No-WiFi build option SmingHub#2004 - get more resources if your application is not using WIFI.
- Multiple SSL adapters based on axTLS and BearSSL.  SmingHub#1999
- Added basic Crypto support library SmingHub#2014
- Updates framework to build using GCC 9.2.0 toolchain for C++17. SmingHub#1825
- Modbus master SmingHub#1992
- Implemented Small String Optimisation (SSO). SmingHub#1951
- Webcam stream and sample webcam web server. SmingHub#1981
- Allow HTTP connections to ignore rejected body content SmingHub#1928

Improvements
-------------------
- Some improvements to multipart parser SmingHub#2007
- Update ArduinoJson to 6.13.0 SmingHub#1979
- Added precaching from Arduino for ESP8266. SmingHub#1965
- Add support for 'Expect: 100-continue' in HTTP server. SmingHub#1931
- Upgrade to FlashString Library  SmingHub#1974, SmingHub#2013

Bug fixes
-------------
- Updated mqtt-codec to allow publish messages without payload. SmingHub#1976
- HttpConnection freed twice. SmingHub#1938
- Hangs at startup when custom heap enabled. SmingHub#1996
- Fix issues reported by valgrind SmingHub#2017

Breaking changes and Migration
-------------------------------------------
- See our [dedicated page](https://sming.readthedocs.io/en/latest/upgrading/4.0-4.1.html) for migration from 4.0.0 to 4.1.0.

All PRs scheduled for this release can be seen from [here](https://github.com/SmingHub/Sming/milestone/23)
  • Loading branch information
slav-at-attachix committed Feb 6, 2020
1 parent 8883768 commit 647dff2
Show file tree
Hide file tree
Showing 599 changed files with 23,245 additions and 8,170 deletions.
3 changes: 2 additions & 1 deletion .appveyor/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ REM Windows build script

set SMING_HOME=%APPVEYOR_BUILD_FOLDER%\Sming

if "%SMING_ARCH%" == "Esp8266" set ESP_HOME=c:\Espressif
if "%build_compiler%" == "udk" set ESP_HOME=%UDK_ROOT%
if "%build_compiler%" == "eqt" set ESP_HOME=%EQT_ROOT%

cd %SMING_HOME%
gcc -v
Expand Down
19 changes: 14 additions & 5 deletions .appveyor/install.cmd
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
REM Windows install script

rmdir /s /q c:\MinGW
curl -LO %SMINGTOOLS%/MinGW.7z
7z -oC:\ x MinGW.7z

goto :%SMING_ARCH%

:Esp8266

choco install esp8266-udk --source https://www.myget.org/F/sming/ -y --no-progress
REM Old toolchain
set TOOLCHAIN=esp-udk-win32.7z
curl -LO %SMINGTOOLS%/%TOOLCHAIN%
7z -o%UDK_ROOT% x %TOOLCHAIN%

REM New toolchain
mkdir %EQT_ROOT%
set TOOLCHAIN=i686-w64-mingw32.xtensa-lx106-elf-a5c9861.1575819473.zip
curl -LO https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu5/%TOOLCHAIN%
7z -o%EQT_ROOT% x %TOOLCHAIN%

goto :EOF


:Host

REM Ensure MinGW installation is up to date
mingw-get update
mingw-get upgrade

goto :EOF

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ vssver2.scc

.metadata
.submodule

sdk/
26 changes: 21 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
url = https://github.com/jacketizer/libyuarel.git
ignore = dirty
[submodule "multipart-parser"]
path = Sming/Components/MultipartParser/multipart-parser
path = Sming/Libraries/MultipartParser/multipart-parser
url = https://github.com/iafonov/multipart-parser-c.git
ignore = dirty
[submodule "FlashString"]
path = Sming/Components/FlashString
url = https://github.com/mikee47/FlashString
ignore = dirty

[submodule "esptool"]
path = Sming/Arch/Esp8266/Components/esptool/esptool
Expand All @@ -36,20 +40,24 @@
url = https://github.com/raburton/esptool2.git
ignore = dirty
[submodule "libsodium"]
path = Sming/Components/libsodium/libsodium
path = Sming/Libraries/libsodium/libsodium
url = https://github.com/jedisct1/libsodium.git
ignore = dirty

[submodule "ESP8266.new-pwm"]
path = Sming/Arch/Esp8266/Components/pwm_open/new-pwm
path = Sming/Arch/Esp8266/Components/driver/new-pwm
url = https://github.com/StefanBruens/ESP8266_new_pwm.git
ignore = dirty
[submodule "ESP8266.axtls-8266"]
[submodule "ESP8266.axtls"]
path = Sming/Components/axtls-8266/axtls-8266
url = https://github.com/igrr/axtls-8266.git
ignore = dirty
[submodule "ESP8266.bearssl"]
path = Sming/Components/bearssl-esp8266/bearssl
url = https://github.com/earlephilhower/bearssl-esp8266
ignore = dirty
[submodule "ESP8266.umm_malloc"]
path = Sming/Arch/Esp8266/Components/custom_heap/umm_malloc
path = Sming/Arch/Esp8266/Components/heap/umm_malloc
url = https://github.com/rhempel/umm_malloc.git
ignore = dirty
[submodule "ESP8266.esp-open-lwip"]
Expand Down Expand Up @@ -122,3 +130,11 @@
path = Sming/Libraries/MCP_CAN_lib
url = https://github.com/coryjfowler/MCP_CAN_lib.git
ignore = dirty
[submodule "Libraries.SmingTest"]
path = Sming/Libraries/SmingTest
url = https://github.com/mikee47/SmingTest
ignore = dirty
[submodule "Libraries.ModbusMaster"]
path = Sming/Libraries/ModbusMaster/ModbusMaster
url = https://github.com/nomis/ModbusMaster.git
ignore = dirty
24 changes: 18 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
language: cpp
os: linux
env:
global:
- SDK_BUILD=258
- SMINGTOOLS=https://github.com/SmingHub/SmingTools/releases/download/1.0
- secure: D/cPk+sL2MNHLtfuU/rMiVN63+CTFpo9Chqa39LEH5VloGqC5f7RyIi2Maa3C/U2JQfM01HlsNR7E5bB0W8DQYbtzBDTqbZ4C7ppZRU5jCQ+L51ERKJ0EAV3KkaravQCRbWt3tlgOp6Xk6xaRMBaHEGrdbFjHYgEMPVteUQNr0A=
- secure: pc8Yqwmn6AM+iBjLNNnknmOoi+AxoyvcVy128b2WXSdj6Q4bOIXgj4WUg8I52i1fgyh0Rxg19WUB6qSVyykCXVdSRajIU1MsKZI+0q44Q83wnwVeYm7nPWxDqS3FKMajucZCg4p0BTE4T6tpnm7zZNHduHnggua/NpP2h7B/Sqs=
- secure: TX0IxYV3tTocCaJcgIA2xzJyHIzbxo7sAkLLYL+OITgWPD1VDUrEqEe7konQA5NIDJJ0VjoHxpdfti2LHG1fw45vrEMfBIOmZG6nW2gxD8ZS2G8KlYIxFB93oNNB6qJRHps1uIANk2hM+Ju6Pnqfc+lLh8oabs974ziAxoYuAJQ=
jobs:
include:
- stage: test
os: linux
dist: xenial
addons:
apt:
packages:
Expand All @@ -23,10 +22,23 @@ jobs:
- graphviz-dev
- xmlstarlet
- jq
env: SMING_ARCH=Host
env:
- SMING_ARCH=Host

- stage: build
os: linux
env: SMING_ARCH=Esp8266 SDK_VERSION=3.0.1
name: C++11
env:
- SMING_ARCH=Esp8266
- SDK_VERSION=3.0.1
- ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-alt-sdk

- stage: build
name: C++17
env:
- SMING_ARCH=Esp8266
- SDK_VERSION=3.0.1
- ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-quick-toolchain

git:
submodules: false
addons:
Expand Down
1 change: 0 additions & 1 deletion .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fi

# Setup ARCH SDK paths
if [ "$SMING_ARCH" == "Esp8266" ]; then
export ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-alt-sdk
export PATH=$PATH:$ESP_HOME/xtensa-lx106-elf/bin:$ESP_HOME/utils/
fi

Expand Down
3 changes: 2 additions & 1 deletion .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ RELEASE_ID=$(echo "$RESPONSE" | jq -r .id)
# [Get all submodules used in this release, pack them and add the archive to the release artifacts]
cd $SMING_HOME
make submodules
ALL_SUBMODULE_DIRS=$(find $SMING_HOME -name '.submodule' | xargs dirname)
ALL_SUBMODULE_DIRS=$(find $SMING_HOME -name '.submodule' | xargs dirname | sed 's/^\(.*\)\/\(Sming\/.*\)$/\2/')
FILE=/tmp/sming-submodules.tgz
cd ../
tar cvzf $FILE $ALL_SUBMODULE_DIRS

curl -H "$AUTH_HEADER" -H "Content-Type: $(file -b --mime-type $FILE)" --data-binary @$FILE "https://uploads.github.com/repos/SmingHub/Sming/releases/$RELEASE_ID/assets?name=$(basename $FILE)"
Expand Down
16 changes: 12 additions & 4 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" == "Test" ]; then
fi

if [ "$SMING_ARCH" == "Esp8266" ]; then
mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk

if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget --no-verbose https://github.com/nodemcu/nodemcu-firmware/raw/2d958750b56fc60297f564b4ec303e47928b5927/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/.
# Old toolchain
TOOLCHAIN=esp-open-sdk-linux-x86_64.tar.gz
wget --no-verbose $SMINGTOOLS/$TOOLCHAIN
tar -zxf $TOOLCHAIN
mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk
ln -s $(pwd)/esp-open-sdk/xtensa-lx106-elf $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/.

# New toolchain
TOOLCHAIN=x86_64-linux-gnu.xtensa-lx106-elf-a5c9861.1575819473.tar.gz
wget --no-verbose https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu5/$TOOLCHAIN
mkdir -p opt/esp-quick-toolchain
tar -zxf $TOOLCHAIN -C opt/esp-quick-toolchain --totals
fi

fi # Esp8266
16 changes: 8 additions & 8 deletions Readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Table of Contents
* [Financial contributions](#financial-contributions)
* [Backers and sponsors](#backers-and-sponsors)

Please note **develop** branch documentation is at [sming.readthedocs.io](https://sming.readthedocs.io/).
Please note Version 4 documentation is at [sming.readthedocs.io](https://sming.readthedocs.io/).

## Summary

Expand All @@ -60,14 +60,15 @@ Please note **develop** branch documentation is at [sming.readthedocs.io](https:
* Async TCP and UDP stack based on [LWIP](http://savannah.nongnu.org/projects/lwip/).
* With clients supporting: HTTP, MQTT, WebSockets and SMTP.
* And servers for: DNS, FTP, HTTP(+ WebSockets), Telnet.
* With SSL support for all network clients and servers based on [axTLS 2.1+](https://github.com/igrr/axtls-8266) with [Lwirax](https://github.com/attachix/lwirax/).
* With [SSL support](https://sming.readthedocs.io/en/latest/framework/core/network/ssl.html) for all network clients and servers. Based on [axTLS](http://axtls.sourceforge.net/) and [BearSSL](https://www.bearssl.org/).
* Out of the box support for OTA over HTTPS.
* ESP8266 specific features.
* Integrated boot loader [rboot](https://sming.readthedocs.io/en/latest/_inc/Sming/Components/rboot/index.html) with support for 1MB ROMs, OTA firmware updating and ROM switching.
* [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging.html) for analyzing/handling system restarts due to fatal errors or WDT resets.
* [PWM support](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/pwm_open/index.html) based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git).
* Optional [custom heap allocation](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/custom_heap/index.html) based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git).
* [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging/index.html) for analyzing/handling system restarts due to fatal errors or WDT resets.
* [PWM support](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/driver/index.html) based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git).
* Optional [custom heap allocation](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/heap/index.html) based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git).
* Based on Espressif NONOS SDK. Officially suppored NON SDK version is >= 3.0.1.
* Support for a [thin No-Wifi-SDK](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/esp_no_wifi/index.html). Helpful when a project does not require WiFi (or networking) and reduces code size and memory usage signficantly.
* Linux/Windows features
* Sming has a [host emulator](https://sming.readthedocs.io/en/latest/arch/host/host-emulator.html) that allows libraries and sample applications to be compiled on a Linux/Windows host system and be tested before uploading them to an actual microcontroller.

Expand All @@ -94,7 +95,7 @@ Linux and Windows OSes with gcc compilers are supported. Clang is NOT supported.

### Stable

- [Sming V4.0.0](https://github.com/SmingHub/Sming/releases/tag/4.0.0) - great new features, performance and stability improvements.
- [Sming V4.1.0](https://github.com/SmingHub/Sming/releases/tag/4.1.0) - great new features, performance and stability improvements.
- [Sming V3.8.1 LTS](https://github.com/SmingHub/Sming/releases/tag/3.8.1) - suitable for older applications that are not yet migrated to Sming v4.x.x.
Long Term Support (LTS) is available till 1st of April, 2020.

Expand Down Expand Up @@ -346,8 +347,7 @@ See [LiveDebug sample](samples/LiveDebug/) for details.
## Contribute

You can contribute to Sming by
- Providing Pull Requests with new features, bug fixes, new ideas, etc.
Make sure to follow our [Coding-Style-Rules](https://github.com/SmingHub/Sming/wiki/Coding-Style-Rules). Read our [Contributing guide](https://github.com/SmingHub/Sming/blob/develop/CONTRIBUTING.md) for details.
- Providing Pull Requests with new features, bug fixes, new ideas, etc. See [Contributing](https://smingdev.readthedocs.io/en/latest/contribute/index.html) for details.
- Testing our latest source code and reporting issues.
- Supporting us financially to acquire hardware for testing and implementing or out of gratitude

Expand Down
80 changes: 0 additions & 80 deletions Sming/Arch/Esp8266/Components/custom_heap/umm_malloc.patch

This file was deleted.

28 changes: 3 additions & 25 deletions Sming/Arch/Esp8266/Components/driver/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,8 @@ Esp8266 Drivers

Provides low-level peripheral drivers.

* UART: Custom asynchronous driver
* PWM: Common header for PWM support
* hw_timer: Driver for hardware timers

.. toctree::
:glob:
:maxdepth: 1

i2s

hw_timer
--------


.. envvar:: USE_US_TIMER

0 (default): Use default /256 prescale for Timer2
1: Use /16 prescale

The following functions depend on Timer2:
- NOW() return value, the Timer2 tick count
- Software timers
- System time

Software timers are driven by Timer2, which by default uses a /256 prescale
providing a resolution of 3.2us and a range of 1' 54".

Enabling this setting increases the resolution to 200ns but reduces the maximum
software timer to 7" 9.5s.
*
29 changes: 24 additions & 5 deletions Sming/Arch/Esp8266/Components/driver/component.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
COMPONENT_DEPENDS := esp8266
COMPONENT_DEPENDS := esp8266

#
COMPONENT_VARS = USE_US_TIMER
USE_US_TIMER ?= 1
COMPONENT_SRCDIRS := .
COMPONENT_INCDIRS := include

COMPONENT_DOXYGEN_INPUT := include/driver

COMPONENT_DOXYGEN_PREDEFINED := \
ENABLE_CUSTOM_PWM=1

# hw_timer
COMPONENT_VARS += USE_US_TIMER
USE_US_TIMER ?= 1
ifeq ($(USE_US_TIMER),1)
GLOBAL_CFLAGS += -DUSE_US_TIMER
GLOBAL_CFLAGS += -DUSE_US_TIMER
endif

# PWM
COMPONENT_RELINK_VARS += ENABLE_CUSTOM_PWM
ENABLE_CUSTOM_PWM ?= 1
ifeq ($(ENABLE_CUSTOM_PWM), 1)
COMPONENT_SUBMODULES += new-pwm
COMPONENT_SRCDIRS += new-pwm
COMPONENT_CFLAGS += -DSDK_PWM_PERIOD_COMPAT_MODE=1
else
LIBS += pwm
endif
7 changes: 7 additions & 0 deletions Sming/Arch/Esp8266/Components/driver/gpio.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GPIO: General-Purpose I/O
=========================

SDK definitions for GPIO.

.. doxygengroup:: gpio_driver
:content-only:

0 comments on commit 647dff2

Please sign in to comment.