Build CircuitPython

Fetch the Code to Build

git clone
cd circuitpython
make fetch-submodules

Install Required Packages

# Install needed Python packages from
pip3 install --upgrade -r requirements-dev.txt
pip3 install --upgrade -r requirements-doc.txt

sudo apt install ninja-build cmake python-is-python3

Install pre-commit

cd circuitpython
# You only need to do this once in each clone.
pre-commit install

Build mpy-cross

make -C mpy-cross


# Download tools

cd ports/espressif
# Do this in each new terminal.
# Set up the correct PATH and other environment variables.

cd ports/espressif
source esp-idf/

Build your board

make BOARD=lolin_s2_mini

Use All Your CPUs When Building

# This CPU has 6 cores and 12 threads.
#Use 12 threads

make -j12 BOARD=lolin_s2_mini

Updating Your Repo

git pull
# only if necessary, from the top level directory
make fetch-submodules
# Then make again.