Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 2.54 KB

README.md

File metadata and controls

62 lines (43 loc) · 2.54 KB

Pycopy firmware builder for ESP32

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

Building the firmware

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.

Double precision floats

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 .

Build arguments

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 .

References