Viable Options To Simplify the Custom Firmware Build Process

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
bitninja
Posts: 155
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

Viable Options To Simplify the Custom Firmware Build Process

Post by bitninja » Sun Oct 10, 2021 12:47 pm

I wanted to tap all the members who have gone through the manual building of MicroPython for the ESP8266. What I am looking for is the best way to build the custom firmware. I am interested in approaches that would make building a custom MicroPython image, not so cumbersome.

Anyway, the only approach I know is to manually follow the jumbled collection of documentation and build the firmware step by step.

Any new ideas would be welcome to. Thanks!

Joe

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by kevinkk525 » Sun Oct 10, 2021 8:31 pm

you can use a script like I do in my project: https://github.com/kevinkk525/pysmartno ... ository.sh
(there are also some board definitions and sync scripts. So I just need to execute the build script and it syncs my project files and builds the firmware).
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

User avatar
pythoncoder
Posts: 5431
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by pythoncoder » Mon Oct 11, 2021 6:57 am

Here is an alternative. As you'll see, mine assumes that the build system is installed, it just streamlines the process of repetitive builds.
Peter Hinch

bitninja
Posts: 155
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by bitninja » Tue Oct 12, 2021 8:34 pm

Thanks for the responses!
I guess I should narrow down the topic to be more in line with what I was thinking.

What I am really looking for is a simple, start with nothing, procedure/application/package that goes something like this...
  • Install small toolset of scripts with maybe a small GUI
  • Download a prebuilt VirtualBox appliance targeting a specific ESP8266 version (ex. v1.17)
  • Specify your frozen modules
  • Kick off a process that eventually spits out a MicroPython bin
Maybe it could done as a wizard-style application... or maybe just a simple one-screen app... I'm not sure at this point. Anyway, I still see your approaches to automation very informative and I may borrow an idea or two!

Any thoughts on my concept?

Thanks

User avatar
pythoncoder
Posts: 5431
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by pythoncoder » Wed Oct 13, 2021 4:29 pm

I don't understand the problem this aims to solve. If it is installing the toolchain then anyone who feels inclined could build a Linux VM with the toolchain and distribute that. That could be useful to beginners.

The rest of the process really isn't "cumbersome". Put the files to be frozen in the right directory, run a script like mine, and it gets built and written to the device. As a command line process it's about as simple as it could possibly be. I guess a GUI would simplify this marginally. But enough to justify the time taken writing it?
Peter Hinch

bitninja
Posts: 155
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by bitninja » Wed Oct 13, 2021 8:56 pm

pythoncoder wrote:
Wed Oct 13, 2021 4:29 pm
I don't understand the problem this aims to solve.
Have you tried building the ESP_OPEN_SDK lately? (https://github.com/pfalcon/esp-open-sdk) It doesn't work. Versions have been updated, files have been moved... it is very difficult... and I've done it many times before!

What I am trying to do is make building the ESP8266 port not such a hassle. If you don't see any value in that... well I guess you don't need it.

User avatar
pythoncoder
Posts: 5431
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Viable Options To Simplify the Custom Firmware Build Process

Post by pythoncoder » Thu Oct 14, 2021 8:30 am

As I said above, a VM with the toolchain installed would be useful. A VM would arguably be easier to use than the README suggestion of docker.

It's the ideas beyond, e.g. of a GUI, that which puzzle me, as the process of freezing modules is straightforward.
Peter Hinch

Post Reply