This project provides a Dockerfile to automate the building process of the ESP32 port of Pycopy. It should also work for building the original MicroPython or other branches of the project.
Versions tested so far (let me know to update this list!):
Branch | Version | Works | Comments |
---|---|---|---|
Pycopy | 3.1.5 | ✓ | |
Pycopy | 3.2.3 | ✓ | |
Pycopy | 3.3.0 | ✓ | |
Pycopy | 3.3.2 | ✓ |
Download the repository and build the Docker image:
$ docker build -t pycopy-builder .
This will take a while, but the image should be built successfully. After that, extract the firmware using
$ ./get_firmware.sh pycopy-builder
and you should get a firmware.bin
file in the directory.
MicroPython comes with simple precision floats by default. If you need a little more, you can enable double precision floats when building the Docker image like
$ docker build -t pycopy-builder --build-arg DOUBLE_PRECISION_FLOATS=true .
There are a few arguments you can use to tweak your build.
Argument name | Default value | Description |
---|---|---|
REPO | https://github.com/pfalcon/pycopy | MicroPython repository to be built. |
BRANCH | v3.3.2 | Branch name of the repository. |
DOUBLE_PRECISION_FLOATS | false | If true , enables double precision floats. |
MODULES_PATH | Module file or modules directory to be frozen. |
Example:
$ docker build -t pycopy-builder \
--build-arg REPO=https://github.com/pfalcon/pycopy \
--build-arg BRANCH=v3.3.2 \
--build-arg DOUBLE_PRECISION_FLOATS=true \
--build-arg MODULES_PATH=your_modules_folder .