From Tuxamito
Revision as of 23:08, 26 December 2015 by Daniel (talk | contribs)
Jump to: navigation, search

The NodeMCU is an open-source firmware and development environment based on the Lua script language for the ESP8266 wifi-enabled microcontroller. For easy development there is available the NodeMCU devkit board that map the contacts of the ESP8266 chip to easy to use pins and contains extra hardware, such as a serial port to USB adapter to flash new firmwares, update the scripts or simply communicate with a PC.

Generating a new firmware

The easiest way to generate a new firmware is to use the online service: NodeMCU Build In it, you only need to select the modules you want to be build into the firmware and then download the generated firmware binary file.

Flashing the firmware

One of the options for flashing a new firmware into a ESP8266 under GNU/Linux is to use this tool: ESP Tool (GiHub) or (Tuxamito).

Under the directory where the tool you will execute the command:

$ ./ --port PORT  write_flash 0x00000 FIRMWARE.bin 

where PORT is the serial port to where the hardware is connected (and you need to have read and write permissions for the user) and FIRMWARE.bin is the binary file of the firmware to flash. An example:

$ ./ --port /dev/ttyUSB0  write_flash 0x00000 ~/Downloads/nodemcu-master-14-modules-2015-12-23-21-28-43-float.bin 

The process might take some minutes and it will show a similar message to this:

Erasing flash...
Writing at 0x0002cc00... (42 %) 

If the process finish successfully this message will appear:

Wrote 431104 bytes at 0x00000000 in 42.0 seconds (82.1 kbit/s)...