======================
A Docker image for building the Micropython firmware for ESP8266 boards.
The underlying ESP Open SDK takes a significant time to build extending the build time of the docker image. Once the initial build is finished however, the resulting container can be used to build additional firmware binaries with shorter build times.
Requires:
- docker engine
- esptool.py
- picocom
Building the docker image compiles the ESP Open SDK, the MicroPython interpreter shell for unix and the vendor provided firmware binary of Micropython for the ESP8266 boards. To specify a particular version of MicroPython provide the docker --build-arg option with the VERSION argument.
bash ./projctl buildor
docker build -t micropython --build-arg VERSION=v1.8.6 .
docker create --name micropython micropythonOnce the docker image is built the firmware can be copied to the host machine.
bash ./projctl copyor
docker cp micropython:/micropython/esp8266/build/firmware-combined.bin firmware-combined.binErase the board's flash to ensure a clean write:
bash ./projctl eraseWrite the firmware to the board's flash:
bash ./projctl writeor
esptool.py --port $SERIAL_PORT --baud 115200 write_flash --verify --flash_size=detect 0 firmware-combined.binConnecting to the serial console:
bash ./projctl connectAccess the container's shell:
bash ./projctl manualor
docker run --rm -it micropython /bin/bash -lAccess the MicroPython interpreter shell for unix:
bash ./projctl unix