Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Feb 8, 2017
2 parents 6f638af + 25367a0 commit e112478
Show file tree
Hide file tree
Showing 142 changed files with 3,524 additions and 595 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
path = Sming/third-party/umm_malloc
url = https://github.com/rhempel/umm_malloc.git
ignore = dirty
[submodule "Sming/third-party/esp-open-lwip"]
path = Sming/third-party/esp-open-lwip
url = https://github.com/pfalcon/esp-open-lwip.git
36 changes: 21 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
sudo: false
language: cpp
os:
- linux
- osx

env:
global:
- SDK_BUILD=258
matrix:
- SDK_VERSION=1.4.0
- SDK_VERSION=1.5.0

matrix:
include:
- os: linux
env: SDK_VERSION=1.5.0
- os: linux
env: SDK_VERSION=2.0.0

git:
submodules: false
addons:
Expand All @@ -18,28 +21,31 @@ addons:
packages:
- bsdtar
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-macos-x86_64.zip"; fi
- if [ "$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" != "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
- mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk
- wget https://bintray.com/artifact/download/kireevco/generic/${SDK_FILE_NAME}
- bsdtar -xf ${SDK_FILE_NAME} -C $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" ] && [ "$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; 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
- export PATH=$PATH:$TRAVIS_BUILD_DIR/opt/esp-alt-sdk/utils/
- export PATH=$PATH:$ESP_HOME/xtensa-lx106-elf/bin:$ESP_HOME/utils/:$SMING_HOME/../.travis/tools
- cd $SMING_HOME
- make test
- make test
- cd $SMING_HOME/../
- export SMING_HAS_CHANGED=`for i in $CHANGED_FILES; do if [[ $i == Sming/* ]]; then echo 1; break; fi; done`
- if [ ! -z "$SMING_HAS_CHANGED" ]; then CHANGED_PROJECTS=`cd $SMING_HOME/../samples; ls -d *`; fi
- for i in $CHANGED_PROJECTS; do echo "Compiling $i"; make -C "samples/$i"; if [ $? -ne 0 ]; then exit 1; fi; done
- cd $SMING_HOME
- make clean
- make clean samples-clean
- make ENABLE_GDB=1
- make Basic_Debug
- make clean
- make clean samples-clean
- make ENABLE_CUSTOM_HEAP=1
- make -C $SMING_HOME/../samples/Basic_Blink clean
- make Basic_Blink ENABLE_CUSTOM_HEAP=1
- make clean samples-clean
- make ENABLE_CUSTOM_LWIP=1; make samples ENABLE_CUSTOM_LWIP=1
Binary file added .travis/tools/esptool2
Binary file not shown.
96 changes: 91 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,104 @@
# Contributing to Sming Framework
All contributions (PRs) to Sming Framework have to be done to _develop_ branch.
If a feature or bugfix is a major change please contact Sming team to prepare feature specific handling.
All contributions (PRs) to Sming Framework have to be done to the _develop_ branch.

__master__: Branch that contains latest production (stable) release. No PRs other than Final Release updates will be merged into __master__.
__develop__: Main development branch: contains all current new features.

This will mean that __all contributors__ will have to submit a PR to a _develop_ , it will be tested and then merged to __develop__ for automated integration testing (via TravisCI, Jenkins or SemaphoreCI), as well as manual testing on a real device.
This means that __all contributors__ will have to submit a PR to a _develop_ , it will be tested and then merged to __develop__ for automated integration testing (via TravisCI, Jenkins or SemaphoreCI), as well as manual testing on a real device.

__Sming Contributing flow__:
- Fork _Sming_ repo
- Create a branch off the _develop_: __MyNewFeature__
- Fork [_Sming_ repo](https://github.com/SmingHub/Sming#fork-destination-box)

After that clone your own fork.

`git clone https://github.com/<my-fork>/Sming.git`

- Create a new branch off the _develop_ branch

```
cd Sming
git checkout develop
git branch feature/<short-explanation>
git checkout feature/<short-explanation>
```

Make sure to replace `short-explanation` with one or two words describing the purpose of the feature.
If you want to commit a fix use `fix/` as prefix for your branch name.

- Build, test your code

Make sure that your code compiles and it is tested on real device. Sometimes you will be asked for a proof (usually screenshot) that it was tested on your device(s).

- Commit changes

```
git add <changed-files>
git commit -m "<Description of the change(s)>"
```

- Push your changes to your fork on github

```
git push
```

- Rebase if needed

If your branch cannot be merged automatically because there are new changes in the official __develop__
branch that conflict with yours then make sure to rebase your branch. The following steps can help
you do this.

First step:
You will need to add the `upstream` repository. This step should be executed ONLY once.

```
cd Sming
git remote add upstream https://github.com/SmingHub/Sming.git
git fetch upstream develop
git checkout develop
git reset --hard upstream/develop
```

Second step:
If you have already defined `upstream` repository and synchronized your `develop` branch to fetch the updates
from `upstream` ( the commands above do this) the next step is to get the latest changes from the official `develop` branch.

This can be done using

```
cd Sming
git checkout develop
git pull
```

Final step:
Now you are ready to merge the latest changes from official `develop` branch into your branch and place your changes on top.
The commands below help you achieve this.

```
cd Sming
git checkout develop
git pull develop
git checkout feature/<short-explanation>
git merge develop
# Fix any merge conflicts if needed.
git rebase develop
# Fix any merge conflicts if needed.
```

If there were merge conflicts you will have to resolve them locally. This usually involves calling the following commands:

```
git mergetool
# After resolving conflicts you should type the command below to see what are the next steps
# Newer versions of `git` are kind enough to show hints
git status
```

After that operation you should have a branch that has all latest changes from __develop__
with your changes on top.


- Submit PR to the main Sming repo, __develop__ branch.
- Work with other contributors to test your feature and get it merged to _develop_

Expand Down
28 changes: 19 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native develo
* [SNI](https://tools.ietf.org/html/rfc6066#page-6) and [Maximum Fragment Length](https://tools.ietf.org/html/rfc6066#page-8) SSL support.
* Optional alternative PWM support based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git)
* Optional custom heap allocation based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git)
* Based on Espressif NONOS SDK. Tested with versions 1.4 and 1.5.
* Based on Espressif NONOS SDK. Tested with versions 1.4, 1.5 and 2.0.

## Compatibility

OS/SDK | Linux | Mac OS X | Windows | FreeBSD-current |
-------|-------|----------|---------|-----------------|
UDK (1.4, 1.5) | n/a | n/a | :sunny: | n/a |
esp-alt-sdk (1.4, 1.5) | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: |
esp-open-sdk (1.4, 1.5, 2.0) | :sunny: | :sunny: | n/a | n/a |

OS = Operating System
SDK = Software Development Kit
n/a = The selected SDK is not available on that OS

## Latest Release
- [Sming V3.0.1](https://github.com/SmingHub/Sming/releases/tag/3.0.1)
Expand All @@ -42,16 +54,14 @@ Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native develo

## Additional needed software
- Spiffy : Source included in Sming repository
- [ESPtool2] (https://github.com/raburton/esptool2) esptool2
- [ESPtool2](https://github.com/raburton/esptool2) esptool2

## Optional features
- Custom PWM: If Sming is compiled with ENABLE_CUSTOM_PWM=1 then instead of using the Espressif SDK pwm library
a [custom PWM library](https://github.com/StefanBruens/ESP8266_new_pwm) will be used.
- SSL: 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 Heap Allocation: If your application is experiencing heap fragmentation then you can try the 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. Avoid enabling
your custom heap allocation AND -mforce-l32 compiler flag.

- 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:off) If you want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with ENABLE_CUSTOM_PWM=1. There is no need to recompile the Sming library.
- 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 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. Avoid enabling your custom heap allocation AND -mforce-l32 compiler flag.

You can find more information about compilation and flashing process by reading esp8266.com forum discussion thread.

Expand Down
Loading

0 comments on commit e112478

Please sign in to comment.