Skip to content

Flashing & Compiling

verybadsoldier edited this page Jul 1, 2019 · 5 revisions

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.



Precompiled rom and filesystems

In order to flash your controller, you will need:

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)



Compiling yourself

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:

Steps

  1. Clone the repository
  • Clone the firmware repository to your local filesystem using git clone --recursive.
  • cd Sming;git submodul update --init
  1. 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 esp-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 do make

  • cd into the projects home directory and do make

  • Furher documentation regarding compilation of Sming: https://github.com/SmingHub/Sming

  1. Webinterface
  • Ready-To-Use webinterface is included in the checkout.
  1. Make and Flash
    If you have followed the instructions until here, you can now compile your own version of the firmware via running make flash

After successfully flashing it is recommended to reset the controller (via reset button or by cycling the power)