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:
Clone the Tote-HAD repository from https://bitbucket.org/thesheep/tote-had
hg clone https://bitbucket.org/thesheep/tote-had
Clone the Micropython repository from [https://github.com/micropython/micropython/
git clone https://github.com/micropython/micropython.git
](https://github.com/micropython/micropython/)
Follow the README.md for the ESP8266 port to setup the build environment. You can also follow one of the guides at http://forum.micropython.org/viewforum.php?f=16
Before compiling, copy or link the files from the python directory of Tote-HAD to esp8266/scripts
Compile and flash normally, as the README says.
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