I am trying to build a custom firmware based on the micropython for the ESP8266 board in an automated environment like CI.
The microphone firmware that is built from the tutorials does show how to load the REPL loop and use the ampy.py script to copy the custom micropython code to the device over the serial port.
Is there a way to add custom scripts to the micropython firmware so that the ".bin" file can be generated from the GitHub CI?
One option we looked at is dumping the flash with custom scripts but it involves manual intervention whenever the code changes.
You can place python scripts in the micropython/ports/esp8266/modules/ folder and during the build they will be compiled and included as frozen python modules in the firmware.bin.
Custom Micropython firmware for ESP8266