-
Notifications
You must be signed in to change notification settings - Fork 6
Flashing & Compiling
There are several possibilities to flash your controller, but most commonly you want to either flash pre-compiled binaries or compile the binaries yourself and flash them afterward.
The pre-compiled binaries provided via github are generated by an automatic build process (TRAVIS-CI) whenever a new version is released. This ensures, that the binaries have not been modified in any sense or include code that might be harmful.
In order to flash your controller, you will need:
- A usb2serial logic level converter (i.e FTDI232 )
- esptool (espressif SDK) or a different tool for flashing the esp
- the precompiled binaries rboot.bin, rom0.bin and spiff_rom.bin
Steps for ESPTOOL
- copy esptool to the directory of the extracted firmware files
- Put the device into serial bootloader mode. First hold reset Button, than set PT0 to GND than release reset Button than release PT0 from GND. Now Device should be in serial bootloader mode.
- replace
COMPORT
with the port of your Serial programmer in the following code and execute it
greater equal 4.0.0
esptool.py -p /dev/COMPORT -b 115200 erase_flash
esptool.py -p /dev/ttyUSB0 -b 115200 write_flash -ff 40m -fm qio -fs 32m 0x3fc000 esp_init_data_default.bin 0x3fe000 blank.bin 0x100000 blankfs.bin
esptool.py -p /dev/ttyUSB0 -b 115200 write_flash -ff 40m -fm qio -fs 32m 0x00000 rboot.bin 0x02000 rom0.bin 0x100000 spiff_rom.bin
< 4.0.0:
esptool -p COMPORT -b 115200 write_flash -ff 40m -fm qio -fs 32m 0x00000 rboot.bin 0x02000 rom0.bin 0x100000 spiff_rom.bin
After successfully flashing it is recommended to reset the controller (via reset button or by cycling the power)
This option is only recommended if you have experience in setting up your own development environments, are comfortable using git/commandline tools/make. This project is using a modified version of the SMING framework. The correct version is included as a submodule (subfolder Sming
). You do not need to have a seperate SMING checkout.
If you want to include the webapplication, you also need:
- esp_rgbww_webinterface source
- A working nodejs and grunt environment
- Clone the repository
- Clone the firmware repository to your local filesystem using
git clone --recursive
. git submodul update --init
- Clone the
esp-open-sdk
to a separate directory:https://github.com/pfalcon/esp-open-sdk
- Compile
esp-open-sdk
git clone --recursive https://github.com/pfalcon/esp-open-sdk
-
make STANDALONE=n VENDOR_SDK=2.1.0-18-g61248df
(we useSTANDALONE=n
to build only the toolchain as we use the SDK that comes bundled withSming
)
or
- Download
esp-open-sdk
(Linux only)
- Instead of compiling the
esp-open-sdk
yourself you can download binaries of the toolchain from here (https://github.com/nodemcu/nodemcu-firmware/raw/2d958750b56fc60297f564b4ec303e47928b5927/tools/esp-open-sdk.tar.xz)
- Setup your development environments
- Export the environment variable
SMING_HOME
to the Sming/Sming directory inside the cloned directory (e.g.export SMING_HOME=/home/me/esp_rgbww_firmware/Sming/Sming
) - export
ESP_HOME
pointing to the directory of theesp-open-sdk
- export
SDK_BASE
pointing to Sming's SDK directory e.g.SDK_BASE=/home/me/Projects/esp_rgbww_firmware/Sming/Sming/third-party/ESP8266_NONOS_SDK/
- cd into
Sming/Sming
and domake
(Further documentation regarding compilation of Sming: https://github.com/SmingHub/Sming)
- Webinterface
- Ready-To-Use webinterface is included in the checkout.
- Make and Flash
- If you have followed the instructions until here, you can now compile your own version of the firmware via running
make
. Usemake flash
to also flash the firmware to the controller after compilation. - Find the compiled binaries in
./out/firmware
After successfully flashing it is recommended to reset the controller (via reset button or by cycling the power)