diff --git a/docs/en/flash.md b/docs/en/flash.md index 8c5cdb11..81a375e7 100644 --- a/docs/en/flash.md +++ b/docs/en/flash.md @@ -24,7 +24,7 @@ Run the following command to flash an *aggregated* binary as is produced for exa `esptool.py --port write_flash -fm 0x00000 .bin` -`mode` is `qio` for 512 kByte modules and `dio` for >=4 MByte modules (`qio` might work as well, YMMV). +[`mode`](https://github.com/espressif/esptool/#flash-modes) is `qio` for most ESP8266 ESP-01/07 (512 kByte modules) and `dio` for most ESP32 and ESP8266 ESP-12 (>=4 MByte modules). ESP8285 requires `dout`. **Gotchas** @@ -34,6 +34,17 @@ Run the following command to flash an *aggregated* binary as is produced for exa - In some uncommon cases, the [SDK init data](#sdk-init-data) may be invalid and NodeMCU may fail to boot. The easiest solution is to fully erase the chip before flashing: `esptool.py --port erase_flash` +### NodeMCU PyFlasher +> Self-contained [NodeMCU](https://github.com/nodemcu/nodemcu-firmware) flasher with GUI based on [esptool.py](https://github.com/espressif/esptool) and [wxPython](https://www.wxpython.org/). + +![NodeMCU PyFlasher](../img/NodeMCU-PyFlasher.png "NodeMCU PyFlasher") + +Source: [https://github.com/marcelstoer/nodemcu-pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher) + +Supported platforms: anything that runs Python, runnable .exe available for Windows + +Disclaimer: the availability of [NodeMCU PyFlasher was announced on the NodeMCU Facebook page](https://www.facebook.com/NodeMCU/posts/663197460515251) but it is not an official offering of the current NodeMCU firmware team. + ### NodeMCU Flasher > A firmware Flash tool for NodeMCU...We are working on next version and will use QT framework. It will be cross platform and open-source. @@ -43,16 +54,6 @@ Supported platforms: Windows Note that this tool was created by the initial developers of the NodeMCU firmware. **It hasn't seen updates since September 2015** and is not maintained by the current NodeMCU *firmware* team. Be careful to not accidentally flash the very old default firmware the tool is shipped with. -### NodeMCU PyFlasher -> Self-contained [NodeMCU](https://github.com/nodemcu/nodemcu-firmware) flasher with GUI based on [esptool.py](https://github.com/espressif/esptool) and [wxPython](https://www.wxpython.org/). - -Source: [https://github.com/marcelstoer/nodemcu-pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher) - -Supported platforms: anything that runs Python, runnable .exe available for Windows - -Disclaimer: the availability of [NodeMCU PyFlasher was announced on the NodeMCU Facebook page](https://www.facebook.com/NodeMCU/posts/663197460515251) but it is not an official offering of the current NodeMCU firmware team. - - ## Putting Device Into Flash Mode To enable ESP8266 firmware flashing GPIO0 pin must be pulled low before the device is reset. Conversely, for a normal boot, GPIO0 must be pulled high or floating. diff --git a/docs/en/upload.md b/docs/en/upload.md index 2f56a79b..1cbd785e 100644 --- a/docs/en/upload.md +++ b/docs/en/upload.md @@ -4,12 +4,12 @@ As with [flashing](flash.md) there are several ways to upload code from your com The NodeMCU serial interface uses 115'200bps at boot time. To change the speed after booting, issue `uart.setup(0,9600,8,0,1,1)`. If the device panics and resets at any time, errors will be written to the serial interface at 115'200 bps. -# Tools +## Tools Transferring application code to ESP8266/8285 is an essential task, one that you'll perform quite frequently. Hence, it does make sense to try a few different uploading tools until you find one you feel comfortable with. [https://frightanic.com/iot/tools-ides-nodemcu/](https://frightanic.com/iot/tools-ides-nodemcu/) lists almost a dozen classical uploaders - in addition to IDEs or IDE-like applications which of course transfer code as well. The NodeMCU firmware team does not give any recommendations as for which uploader to use nor are there any "NodeMCU approved" tools. The below listed tools are just three, in no particular order, which seem popular and/or reasonably well maintained. -## ESPlorer +### ESPlorer > The essential multiplatforms tools for any ESP8266 developer from luatool author’s, including Lua for NodeMCU and MicroPython. Also, all AT commands are supported. Requires Java (Standard Edition - SE ver 7 and above) installed. @@ -19,7 +19,7 @@ Source: [https://github.com/4refr0nt/ESPlorer](https://github.com/4refr0nt/ESPlo Supported platforms: macOS, Linux, Windows, anything that runs Java -## nodemcu-uploader.py +### nodemcu-uploader.py > A simple tool for uploading files to the filesystem of an ESP8266 running NodeMCU as well as some other useful commands. @@ -27,7 +27,7 @@ Source: [https://github.com/kmpm/nodemcu-uploader](https://github.com/kmpm/nodem Supported platforms: macOS, Linux, Windows, anything that runs Python -## NodeMCU-Tool +### NodeMCU-Tool > Upload/Download Lua files to your ESP8266 module with NodeMCU firmware. > Simple. Command Line. Cross-Platform. File Management. NodeMCU. @@ -36,7 +36,7 @@ Source: [https://github.com/andidittrich/NodeMCU-Tool](https://github.com/andidi Supported platforms: macOS, Linux Windows, anything that runs Node.js -# init.lua +## init.lua You will see "lua: cannot open init.lua" printed to the serial console when the device boots after it's been freshly flashed. If NodeMCU finds a `init.lua` in the root of the file system it will execute it as part of the boot sequence (standard Lua feature). Hence, your application is initialized and triggered from `init.lua`. Usually you first set up the WiFi connection and only continue once that has been successful. Be very careful not to lock yourself out! If there's a bug in your `init.lua` you may be stuck in an infinite reboot loop. It is, therefore, advisable to build a small delay into your startup sequence that would allow you to interrupt the sequence by e.g. deleting or renaming `init.lua` (see also [FAQ](lua-developer-faq.md#how-do-i-avoid-a-panic-loop-in-initlua)). Your `init.lua` is most likely going to be different than the one below but it's a good starting point for customizations: @@ -116,7 +116,7 @@ wifi.sta.config({ssid=SSID, pwd=PASSWORD}) ``` -# Compiling Lua on your PC for Uploading +## Compiling Lua on your PC for Uploading If you install `lua` on your development PC or Laptop then you can use the standard Lua compiler to syntax check any Lua source before downloading it to the ESP8266 module. However, diff --git a/docs/img/NodeMCU-PyFlasher.png b/docs/img/NodeMCU-PyFlasher.png new file mode 100644 index 00000000..e8bcac7e Binary files /dev/null and b/docs/img/NodeMCU-PyFlasher.png differ