slint-ui/slint · warning

failed: exited with

Error message

${board.feature} failed: ${e.cmd} exited with ${e.returncode}

What it means

build_mcu iterates all MCU boards, calling build_board for each; if a board's cargo/subprocess build exits with a non-zero status (subprocess.CalledProcessError), it warns '<feature> failed: <cmd> exited with <returncode>', records the feature in the failed list, and continues with the remaining boards. The error reports which command failed and its exit code so partially successful runs still emit the images that did build.

Solutions

  1. Read the full cargo output above the warning to find the underlying compile/toolchain error and fix it
  2. Install the missing rustup target: rustup target add <triple>
  3. Re-run the script after fixing; failed boards are re-attempted
  4. Temporarily remove the failing board from the run and rebuild the rest
Defensive patterns

Strategy: try-catch

Validate before calling

for t in {board_targets}; do rustup target list --installed | grep -q "$t" || echo "missing rustup target: $t"; done

Try / catch

try:
    build_board(board, out)
except subprocess.CalledProcessError as e:
    warn(f"{board.feature} failed: {' '.join(e.cmd)} exited with {e.returncode}")
    failed.append(board.feature)
    continue

Prevention

When it happens

Trigger: build_board's cargo invocation fails for a specific board — e.g. compilation error for that board's target, missing target/rustup toolchain, failing build.rs, or out-of-sync dependency — raising subprocess.CalledProcessError with check=True.

Common situations: rustup target for an embedded triple not installed; code change breaks one board's feature-gated build while others still compile; disk full or toolchain version mismatch on CI.

Related errors


AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16). Data as JSON: /api/errors/774b78994cdf0b20. Report an issue: GitHub.

Appendix: source

Thrown at scripts/build-demo-images.py:276

                "--chip",
                board.chip,
                "--flash-size",
                "16mb",
                str(elf),
                str(image),
            ]
        )


def build_mcu(out: Path) -> tuple[list[dict], list[str]]:
    """Build every board, keeping going past a failure so one bad board doesn't
    discard the images that did build."""
    records, failed = [], []
    for board in BOARDS:
        try:
            build_board(board, out)
        except subprocess.CalledProcessError as e:
            warn(
                f"{board.feature} failed: {' '.join(e.cmd)} exited with {e.returncode}"
            )
            failed.append(board.feature)
            continue
        records.append(
            {
                "feature": board.feature,
                "name": board.name,
                "method": board.method,
                "file": board.image_name,
                "chip": board.chip,
                "offset": "0x0" if board.method == "esp" else "",
                "demo": DEFAULT_DEMO,
            }
        )
    return records, failed

View on GitHub (pinned to bb937076de)