Compiling Your Own Firmware

Published on 2016-04-14 in Tote HaD.

For anyone who wants to build their own version of firmware, here’s a really quick howto:

hg clone https://bitbucket.org/thesheep/tote-had
git clone https://github.com/micropython/micropython.git

](https://github.com/micropython/micropython/)

You can also skip the main.py file (it’s the file that gets executed on the board start), and instead create it after flashing – this way you will be able to modify it without recompiling the firmware:

with open("main.py", "w") as f:
    f.write("import server; server.main()")

There are some tools that make it easier to upload files to the ESP8266, like here: https://github.com/wendlers/mpfshell