When using a newly bought ESP-01 module from Ai-Thinker with
minicom serial terminal, one should «send» commands to the module with
C-j (a simple Enter key won’t work). AT commands may be used out of the box.
To build NodeMCU firmware, I used marcelstoer/nodemcu-build Docker image that contains the toolchain. This left me with a
nodemcu_float_master_*.bin file that needs to get onto the board. Time to flash NodeMCU and get hacking! I used esptool and nodemcu-uploader:
pip inistall esptool nodemcu-uploader
GPIO0 pin has to be pulled down prior to powering the board to enter the flashing mode (I used a pin to short GND and GPIO0). Now the command to run is:
esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -fm qio 0x00000 bin/nodemcu_float_master_20180210-1805.bin
This has to be done only once (unless you change the firmware and/or its config).
From now on, project
*.lua files can be uploaded to the board via
nodemcu-uploader --port /dev/tty.SLAB_USBtoUART upload *.lua