Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 / flagDescription
PROJECT_DIRThe 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.
--prettyAlso write the model as the UPPAAL GUI’s XML, build/<name>.xml.

What it does

  1. Reads fire.toml and resolves the source directory (project.src).
  2. Builds the image with fic <src> --board <board> --build-profile <profile>, with the toolchain from [run.target] or the environment, and the model with fic <src> --emit=xta. The image is skipped when it is newer than every source file and fire.toml, the model when it is newer than every source file (✓ image up to date: …, ✓ model up to date: …).
  3. fire run only: launches qemu-system-aarch64 with 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

SymptomLikely 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 variableSet $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 ficPut fic beside fire or on PATH, or set $FIRE_FIC.
warning: WF2 violation: channel dependency graph contains a cycleSee --allow-wf2-cycles.
C compile errorsThe C is compiled with -Wall -Werror: fix the warning in the imported file.
QEMU exits at onceCheck the [run] args loader address against the board: addr=0x70000000 for qemu_virt_aarch64.