Beginner Guide Create your own Firmware Build - FengtianGu/Sonoff-Tasmota GitHub Wiki

Preparation

You can use Atom to build your own firmware. In this guide Atom on Windows 10 x64 is described.

After the setup is done, Atom should be started already. Now you need to install the platform.io IDE for Atom:

  • Top Menu: File > Settings > Install

  • Now you can search for a package. Search for platform.io IDE

  • Choose platformio-ide and hit the Install Button

  • Atom will ask you to install Clang now, do this by clicking on "Install Clang"

  • A new website will popup. Scroll down to "II. Clang for Intelligent Code Completion" and hit the Download Button. If the download is done, start the setup. Please select "Add LLVM to the system PATH" option on the installation step.

  • After you have installed Clang close the website and go back to Atom. After Atom has installed all Packages you need to restart Atom.

You got Atom with Platform.io ready now.

Building the firmware

First you need to get the Sourcefiles from Github.

Go to the Code Page.

Now you can change the Branch(1). I suggest you to use the development Branch.

Then click on "Clone or Download"(2) and choose "Download Zip"(3)

Go to the location you saved the ZIP and unzip it by right clicking it and choose "Extract All".

Back to Atom open the PlatformIO Home Tab (should be open already).

Click on "Open Project" and choose the unzipped folder you just downloaded. Be sure that the platformio.ini file is there. This is important to load the custom platformio.ini file.

In the left Sidebar navigate to sonoff/my_user_config.h and change your default configuration in this file. I suggest you to read everything in there and adapt everything to your needs.

If you are done press ctrl+s to save the file.

At last go to PlatformIO Menu and click on "Build". Atom is now starting to compile the firmware. To speed up the compiling, you can uncomment your preferred language in the platformio.ini file (remove the ";" from one line, dont forget to save ctrl+s).

After its done, you can find the firmware in the .pioenvs directory in the unzipped folder.
Attention: .pioenvs is a hidden folder on unix systems.