The build command
./build.py [--interpreter {micropython,circuitpython}] [--port PORT]
[--board BOARD] [--variant VARIANT] [--modules MODULES]
[--flash FLASH] [--no-autosize] [--keep-fs SIZE] [--coredump] [--clean]
[make arguments]
Leave out --port and it asks for port, board and variant. On a port that has
boards, leave out --board and it asks for that. --variant is always
optional. Leave out --modules and it lists modules/ and asks.
Options
Option |
Meaning |
|---|---|
|
|
|
The port: |
|
The board, by upstream’s directory name. |
|
A variant of the board or port: upstream’s, or one of ours in |
|
A comma list of short names, full paths, or |
|
esp32 flash size, such as |
|
esp32, rp2 and the Arduino GIGA: refuse instead of growing the firmware’s share of flash. |
|
esp32 and rp2: build beside the filesystem a board already has, its size in bytes or KB ( |
|
esp32: a troubleshooting build that writes a core dump to flash on a crash. Standard builds don’t. |
|
Delete this target’s build directory first. |
Arguments it doesn’t recognise go to make, such as -j4 or V=1. On a
CircuitPython build they are part of the build record.
Environment
Variable |
Default |
Meaning |
|---|---|---|
|
|
Where builds go. |
|
Where our variants are found. |
|
|
Where modules are found. |
|
|
every core |
The parallelism handed to make. |
|
|
On Windows, the MSYS2 whose make and MinGW gcc build the windows port. |
|
|
Where an esp32 build installs ESP-IDF’s toolchains. |
Output
Output lands in builds/<port>/[<board>/]<variant>/, and in
builds/circuitpython/<port>/<board or variant>/ for CircuitPython. A
--coredump build adds -coredump to the variant’s name. With no --variant
the last directory is:
Port |
Directory |
|---|---|
esp32, rp2 |
|
unix, windows, webassembly |
|
CircuitPython unix |
|
Each build folder holds omnipython-build.json, a record of every module’s
commit, and the files the build made: firmware.bin on esp32, firmware.uf2
on rp2, micropython on unix, micropython.exe on windows, micropython.mjs
and micropython.wasm on webassembly.