Skip to content

Commit 310faf7

Browse files
authored
Merge pull request #2886 from nodemcu/dev
Next master drop
2 parents 68c425c + a08e74d commit 310faf7

File tree

368 files changed

+10960
-8655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+10960
-8655
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local/
66
user_config.h
77
server-ca.crt
88
luac.cross
9+
luac.cross.int
910
uz_unzip
1011
uz_zip
1112
tools/toolchains/
@@ -14,3 +15,7 @@ tools/toolchains/
1415
.cproject
1516
.project
1617
.settings/
18+
.vscode
19+
20+
#ignore temp file for build infos
21+
buildinfo.h

.travis.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1+
#os:
2+
# - windows
3+
# - linux
4+
15
language: cpp
6+
7+
matrix:
8+
include:
9+
- os: linux
10+
env:
11+
- OS="$TRAVIS_OS_NAME"
12+
- LUACC=./luac.cross
13+
- os: windows
14+
env:
15+
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
16+
- OS="$TRAVIS_OS_NAME"
17+
- LUACC=msvc/luac-cross/x64/Debug/luac.cross.exe
218
addons:
319
apt:
420
packages:
@@ -8,16 +24,13 @@ cache:
824
- directories:
925
- cache
1026
script:
11-
- export BUILD_DATE=$(date +%Y%m%d)
12-
- make EXTRA_CCFLAGS="-DBUILD_DATE='\"'$BUILD_DATE'\"'" all
13-
- cd bin/
14-
- file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
15-
- srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
16-
- cd ../
17-
- make clean
18-
- make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL -DBUILD_DATE='\"'$BUILD_DATE'\"'"
19-
- cd bin/
20-
- file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
21-
- srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
27+
- echo OS is $OS $TRAVIS_OS_NAME
2228
# http://docs.travis-ci.com/user/environment-variables/#Convenience-Variables
23-
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/pr-build.sh; fi
29+
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-linux.sh; fi
30+
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-windows-ms.sh; fi
31+
- if [ "$OS" = "linux" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/pr-build.sh; fi
32+
- cd "$TRAVIS_BUILD_DIR"
33+
- echo "checking:"
34+
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 echo
35+
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 $LUACC -p
36+
# - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck.sh || true ; fi

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ Use the platform and tools you feel most comfortable with. There are no constrai
2626
- [Full-fledged Linux environment](http://www.esp8266.com/wiki/doku.php?id=toolchain#how_to_setup_a_vm_to_host_your_toolchain), either physical or virtual.
2727
- [Docker image](https://hub.docker.com/r/marcelstoer/nodemcu-build/) which allows running the build inside the container as if you were running a build script on your local machine.
2828

29+
## Writing Lua Code
30+
A great resource about writing Lua for NodeMCU can be found in [Lua Developer FAQ](https://nodemcu.readthedocs.io/en/latest/lua-developer-faq/) - make sure to read it! When you're writing your Lua code and it's not working as it should you can test it with `luacheck` tool that can help you find various types of bugs. To install it you have to install [luarocks](https://luarocks.org/) and use command `sudo luarocks install luacheck` to install the tool. Now you're ready to go! By using this command (assuming you're in `nodemcu-firmware` directory):
31+
32+
`luacheck --config tools/luacheck_config.lua <your file to check>`
33+
34+
you can look for bugs and problems within the code!
35+
2936
## Writing Documentation
3037
The NodeMCU documentation is maintained within the same repository as the code. The primary reason is to keep the two in sync more easily. It's thus trivial for the NodeMCU team to verify that a PR includes the necessary documentation. Furthermore, the documentation is merged automatically with the code if it moves from branch X to Y.
3138

0 commit comments

Comments
 (0)