build_gateware
Compiles an Amaranth design into an ECP5 .bit bitstream for the Cynthion via yosys, nextpnr-ecp5, and ecppack, then load it with configure_bitstream. Reports failures with the build log tail.
Instructions
Build an Amaranth design for the Cynthion ECP5 into a .bit bitstream in a subprocess (yosys -> nextpnr-ecp5 -> ecppack), with progress. Never touches the board; load the result with configure_bitstream(path=). Design/toolchain failures are reported as [BUILD_FAILED] with the log tail.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "build_gateware"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Top-level attribute (class, instance or zero-arg factory). Default: auto-detect top/Top/create_top() or the single Elaboratable. | |
| source | Yes | Path to a Python (.py) file defining an Amaranth design. | |
| timeout_s | No | Kill the build after this many seconds. | |
| extra_args | No | Amaranth toolchain overrides: dict, JSON object or ['key=value', ...], e.g. {'nextpnr_opts': '--seed 2', 'verbose': true}. | |
| output_dir | No | Build directory (default: a timestamped folder in the server output directory). | |
| elaborate_only | No | Only elaborate and write the build plan (RTLIL, LPF, scripts); no toolchain needed. | |
| platform_revision | No | Cynthion hardware revision, e.g. 'r1.4' (default r1.4). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||