You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
The following is a set of guidelines for contributing to NodeMCU on GitHub. These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
6
6
7
-
It is appreciated if you raise an issue _before_ you start changing NodeMCU, discussing the proposed change; emphasing that the you are proposing to develop the patch yourself, and outlining the strategy for implementation. This type of discussion is what we should be doing on the issues list and it is better to do this before or in parallel to developing the patch rather than having "you should have done it this way" type of feedback on the PR itself.
7
+
It is appreciated if you raise an issue _before_ you start changing NodeMCU, discussing the proposed change; emphasizing that you are proposing to develop the patch yourself, and outlining the strategy for implementation. This type of discussion is what we should be doing on the issues list and it is better to do this before or in parallel to developing the patch rather than having "you should have done it this way" type of feedback on the PR itself.
8
8
9
9
### Table Of Contents
10
10
*[General remarks](#general-remarks)
@@ -16,20 +16,20 @@ It is appreciated if you raise an issue _before_ you start changing NodeMCU, dis
16
16
*[Commit messages](#commit-messages)
17
17
*[For collaborators](#for-collaborators)
18
18
*[Handling releases](#handling-releases)
19
-
19
+
20
20
## General remarks
21
21
We are a friendly and welcoming community and look forward to your contributions. Once your contribution is integrated into this repository we feel responsible for it. Therefore, be prepared for constructive feedback. Before we merge anything we need to ensure that it fits in and is consistent with the rest of NodeMCU.
22
-
If you made something really cool but won't spend time to integrate it into this upstream project please still share it in your fork on GitHub. If you mention it in an issues we'll take a look at it anyway.
22
+
If you made something really cool but won't spend the time to integrate it into this upstream project please still share it in your fork on GitHub. If you mention it in an issue we'll take a look at it anyway.
23
23
24
24
## Development environment setup
25
-
Use the platform and tools you feel most comfortable with. There are no constraints imposed by this project. You have (at least) two options to set up the toolchain to build the NodeMCU firmware:
25
+
Use the platform and tools you feel most comfortable with. There are no constraints imposed by this project. You have (at least) two options to set up the toolchain to build the NodeMCU firmware:
26
26
-[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.
27
-
-[Docker image](https://hub.docker.com/r/marcelstoer/nodemcu-build/) which allows to run the build inside the container as if you were running a build script on your local machine.
27
+
-[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.
28
28
29
29
## Writing Documentation
30
30
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.
31
31
32
-
The documentation consists of a collection of Markdown files (see note on Markdown syntax at end of chapter) stored in the [`/docs`](docs) directory. With every commit a human readable and browsable version is automatically built with [Read the Docs](https://readthedocs.io/) (RTD). The public NodeMCU documentation can be found at [nodemcu.readthedocs.io](http://nodemcu.readthedocs.io/).
32
+
The documentation consists of a collection of Markdown files (see note on Markdown syntax at end of chapter) stored in the [`/docs`](docs) directory. With every commit, a human readable and browsable version is automatically built with [Read the Docs](https://readthedocs.io/) (RTD). The public NodeMCU documentation can be found at [nodemcu.readthedocs.io](http://nodemcu.readthedocs.io/).
33
33
34
34
There are essentially only two things to keep in mind if you're contributing a PR:
1. Think about [squashing (some of) your commits](http://www.andrewconnell.com/blog/squash-multiple-git-commits-into-one). There are [several ways](http://stackoverflow.com/a/5201642/131929) to do this. There's no need to squash everything into a single commit as GitHub offers to do this when we merge your changes. However, you might want to trim your commit history to relevant chunks.
62
62
1. Bring your fork up-to-date with the NodeMCU upstream repo ([see below](#keeping-your-fork-in-sync)). Then rebase your branch on `dev` running `git rebase dev`.
63
63
1.`git push`
64
-
1.[Create a pull request](https://help.github.com/articles/creating-a-pull-request/) (PR) on GitHub.
64
+
1.[Create a pull request](https://help.github.com/articles/creating-a-pull-request/) (PR) on GitHub.
65
65
66
66
This is just one way of doing things. If you're proficient in Git matters you're free to choose your own. If you want to read more then the [GitHub chapter in the Git book](http://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project#The-GitHub-Flow) is a way to start. [GitHub's own documentation](https://help.github.com/categories/collaborating/) contains a wealth of information as well.
67
67
@@ -100,13 +100,13 @@ Don't forget to [reference affected issues](https://help.github.com/articles/clo
100
100
## For collaborators
101
101
102
102
### Handling releases
103
-
- Create a [milestone](https://github.com/nodemcu/nodemcu-firmware/milestones) right after you cut a new release. Give it a meaningful name if you already have an idea what the scope of the upcoming release is going to be. Also set the due date to ~2 months in the future.
104
-
- Add this milestone to every PR before you merge it. Also add the milestone to PRs you want to see land in this milestone.
103
+
- Create a [milestone](https://github.com/nodemcu/nodemcu-firmware/milestones) right after you cut a new release. Give it a meaningful name if you already have an idea what the scope of the upcoming release is going to be. Set the due date to ~2 months in the future.
104
+
- Add this milestone to every PR before you merge it. Also, add the milestone to PRs you want to see land in this milestone.
105
105
- Add notes to the description of the milestone in the course of the ~2 months it lives.
106
-
- Be careful and reluctant to merge PRs once we're past the 6-weeks mark of a milestone. Ideally we don't merge anything in the last 2 weeks.
106
+
- Be careful and reluctant to merge PRs once we're past the 6-weeks mark of a milestone. Ideally, we don't merge anything in the last 2 weeks.
107
107
- Cutting a release
108
-
- Create a PR for the `master` branch for collaborators to approve.
109
-
- Once approved merge it. :exclamation::boom::exclamation: Make sure you do NOT "squash and merge" but make a regular merge commit!
110
-
- Fetch the changes into your local clone and create an annotated tag like so: `git tag -a <SDK-version>-master_<yyyyMMdd> -m ""`, `git push --tags`
111
-
- Create a new [release](https://github.com/nodemcu/nodemcu-firmware/releases) based on the tag you just pushed. The version name is the same as the tag name.
112
-
- Write release notes. Mention breaking changes explicitly. Since every PR that went into this release is linked to from the milestone it should be fairly easy to include important changes in the release notes.
108
+
- Create a PR for the `master` branch for collaborators to approve.
109
+
- Once approved merge it. :exclamation::boom::exclamation: Make sure you do NOT "squash and merge" but make a regular merge commit!
110
+
- Fetch the changes into your local clone and create an annotated tag like so: `git tag -a <SDK-version>-master_<yyyyMMdd> -m ""`, `git push --tags`
111
+
- Create a new [release](https://github.com/nodemcu/nodemcu-firmware/releases) based on the tag you just pushed. The version name is the same as the tag name.
112
+
- Write release notes. Mention breaking changes explicitly. Since every PR that went into this release is linked to from the milestone it should be fairly easy to include important changes in the release notes.
[](https://gitter.im/nodemcu/nodemcu-firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
NodeMCU is an [eLua](http://www.eluaproject.net/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/en/products/esp8266/). The firmware is based on the [Espressif NON-OS SDK 2.0.0](https://espressif.com/sites/default/files/sdks/esp8266_nonos_sdk_v2.0.0_16_08_10.zip) and uses a file system based on [spiffs](https://github.com/pellepl/spiffs). The code repository consists of 98.1% C-code that glues the thin Lua veneer to the SDK.
10
+
NodeMCU is an [eLua](http://www.eluaproject.net/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/en/products/esp8266/). The firmware is based on the [Espressif NON-OS SDK 2.1.0](https://github.com/espressif/ESP8266_NONOS_SDK/releases/tag/v2.1.0) and uses a file system based on [spiffs](https://github.com/pellepl/spiffs). The code repository consists of 98.1% C-code that glues the thin Lua veneer to the SDK.
11
11
12
12
The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits](https://github.com/nodemcu/nodemcu-devkit-v1.0), ready-made open source development boards with ESP8266-12E chips.
13
13
@@ -16,7 +16,7 @@ The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits](
16
16
- Easy to program wireless node and/or access point
17
17
- Based on Lua 5.1.4 (without *debug, os* modules)
18
18
- Asynchronous event-driven programming model
19
-
-40+ built-in modules
19
+
-55+ built-in modules
20
20
- Firmware available with or without floating point support (integer-only uses less memory)
21
21
- Up-to-date documentation at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io)
The entire [NodeMCU documentation](https://nodemcu.readthedocs.io) is maintained right in this repository at [/docs](docs). The fact that the API documentation is mainted in the same repository as the code that *provides* the API ensures consistency between the two. With every commit the documentation is rebuilt by Read the Docs and thus transformed from terse Markdown into a nicely browsable HTML site at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io).
46
+
The entire [NodeMCU documentation](https://nodemcu.readthedocs.io) is maintained right in this repository at [/docs](docs). The fact that the API documentation is maintained in the same repository as the code that *provides* the API ensures consistency between the two. With every commit the documentation is rebuilt by Read the Docs and thus transformed from terse Markdown into a nicely browsable HTML site at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io).
47
47
48
48
- How to [build the firmware](https://nodemcu.readthedocs.io/en/master/en/build/)
49
-
- How to [build the filesystem](https://nodemcu.readthedocs.io/en/master/en/spiffs/)
50
49
- How to [flash the firmware](https://nodemcu.readthedocs.io/en/master/en/flash/)
51
50
- How to [upload code and NodeMCU IDEs](https://nodemcu.readthedocs.io/en/master/en/upload/)
52
51
- API documentation for every module
@@ -66,52 +65,3 @@ See [https://nodemcu.readthedocs.io/en/master/en/support/](https://nodemcu.readt
The following sections explain some of the options you have if you want to [build your own NodeMCU firmware](http://nodemcu.readthedocs.io/en/master/en/build/).
73
-
74
-
### Select Modules
75
-
76
-
Disable modules you won't be using to reduce firmware size and free up some RAM. The ESP8266 is quite limited in available RAM and running out of memory can cause a system panic. The default configuration is designed to run on all ESP modules including the 512 KB modules like ESP-01 and only includes general purpose interface modules which require at most two GPIO pins.
77
-
78
-
Edit `app/include/user_modules.h` and comment-out the `#define` statement for modules you don't need. Example:
79
-
80
-
```c
81
-
...
82
-
#defineLUA_USE_MODULES_MQTT
83
-
// #define LUA_USE_MODULES_COAP
84
-
// #define LUA_USE_MODULES_U8G
85
-
...
86
-
```
87
-
88
-
### Tag Your Build
89
-
90
-
Identify your firmware builds by editing `app/include/user_version.h`
91
-
92
-
```c
93
-
#defineNODE_VERSION"NodeMCU 2.0.0+myname"
94
-
#ifndef BUILD_DATE
95
-
#define BUILD_DATE "YYYYMMDD"
96
-
#endif
97
-
```
98
-
99
-
### Set UART Bit Rate
100
-
101
-
The initial baud rate at boot time is 115200bps. You can change this by
102
-
editing `BIT_RATE_DEFAULT` in `app/include/user_config.h`:
103
-
104
-
```c
105
-
#defineBIT_RATE_DEFAULT BIT_RATE_115200
106
-
```
107
-
108
-
Note that, by default, the firmware runs an auto-baudrate detection algorithm so that typing a few characters at boot time will cause
109
-
the firmware to lock onto that baud rate (between 1200 and 230400).
110
-
111
-
### Debugging
112
-
113
-
To enable runtime debug messages to serial console edit `app/include/user_config.h`
0 commit comments