Building and Running: fire build / fire run
fire build compiles a project to a bootable Microkit image and its
UPPAAL model; fire run builds the image and launches it, as configured
in fire.toml. fire clean removes what they generated.
Usage
fire build [PROJECT_DIR] [-o <IMG>] [--target <img,xta>] [--pretty]
fire run [PROJECT_DIR] [-o <IMG>]
fire clean [PROJECT_DIR]
| Argument / flag | Description |
|---|---|
PROJECT_DIR | The directory holding fire.toml. Defaults to the current directory. |
-o, --output <IMG> | The image path, instead of <src>/build/<name>.img. |
--target <img,xta> | What fire build builds: the image (img), the model (xta), or both, the default. |
--pretty | Also write the model as the UPPAAL GUI’s XML, build/<name>.xml. |
What it does
- Reads
fire.tomland resolves the source directory (project.src). - Builds the image with
fic <src> --board <board> --build-profile <profile>, with the toolchain from[run.target]or the environment, and the model withfic <src> --emit=xta. The image is skipped when it is newer than every source file andfire.toml, the model when it is newer than every source file (✓ image up to date: …,✓ model up to date: …). fire runonly: launchesqemu-system-aarch64with the[run] args,{img}replaced by the image’s path.
fire clean removes build/ (the image, the model, and anything the
UPPAAL GUI saved beside it) and include/gen/, then include/ if that
leaves it empty. It never touches the sources or spec/.
Walkthrough: ping-pong
$ fire build demo/pingpong/
fire: building pingpong for qemu_virt_aarch64 (debug)
✓ Wrote the data-layer headers to demo/pingpong/include/gen
✓ Parsed 1 system + 2 program files + 1 foreign module(s)
...
✓ Generated 2 C file(s) in demo/pingpong/build/gen
MICROKIT|CAPDL SPEC: number of root objects = 52, spec footprint = 7.55 KiB
MICROKIT|INITIAL TASK: memory size = 384 KiB
MICROKIT|LOADER: image file size = 2.64 MiB
✓ image: demo/pingpong/build/pingpong.img
...
✓ UPPAAL model written to demo/pingpong/build/pingpong.xta
fire run demo/pingpong/ then boots the image in QEMU; with
-serial mon:stdio the PDs’ output appears in your terminal. Exit QEMU
with Ctrl-A x.
The Microkit build report, build/report.txt, shows the memory layout
and the values patched into each PD.
Troubleshooting
| Symptom | Likely cause / fix |
|---|---|
no fire.toml in ... | PROJECT_DIR has no manifest: pass the project directory, not the repository root. |
Could not read MICROKIT_SDK environment variable | Set $MICROKIT_SDK or [run.target] sdk. Likewise for GCC and LD. |
board path '...' does not exist | [run.target] board / profile is not a directory under <sdk>/board/. |
failed to launch fic | Put fic beside fire or on PATH, or set $FIRE_FIC. |
warning: WF2 violation: channel dependency graph contains a cycle | See --allow-wf2-cycles. |
| C compile errors | The C is compiled with -Wall -Werror: fix the warning in the imported file. |
| QEMU exits at once | Check the [run] args loader address against the board: addr=0x70000000 for qemu_virt_aarch64. |