Skip to main content

CruciHiL

CruciHiL is a Hardware-in-the-Loop (HiL) testing platform that catches firmware regressions before they reach the field. Write tests in Python, run them against virtual simulation before hardware exists, then run identical tests against real hardware with zero code changes.

Quickstart

Run your first test in under five minutes — no hardware required.

crucihil analyze

Extract the signal interface contract of any C/C++ firmware component.

Rig Configuration

Configure CAN, Ethernet, power, GPIO, and ECU connections in TOML.

MCP Tools

Connect Claude, Copilot, or Cursor directly to your test infrastructure.

What CruciHiL solves

Firmware teams waste enormous time on two problems:
  1. Test authoring friction — figuring out which signals a component actually reads and writes takes days of reading code, tracing RTE wrappers, and asking around.
  2. Hardware dependency — tests can’t run until hardware is built, so regressions are found late and fixes are expensive.
CruciHiL attacks both. The crucihil analyze command uses static analysis and AI to extract the signal interface contract of any C/C++ component in minutes. The virtual backend lets tests run in CI with no hardware at all, using the same test code that will later run against a real ECU.

Architecture

CruciHiL is organized in six layers. Every component maps to exactly one layer.
Layer 6 — Interfaces      CLI · Web Dashboard · CI/CD webhooks
Layer 5 — AI Interface    MCP Server (FastMCP) — 14 tools
Layer 4 — Cloud Control   FastAPI + PostgreSQL — orchestration and history
Layer 3 — Local Agent     Test runner · YAML executor · result reporter
Layer 2 — Rig HAL         rig.can / rig.sim / rig.fault / rig.ecu
Layer 1 — Hardware        CAN · Ethernet · GPIO · Power · ECUs
The key property of this architecture: Layer 2 (the Rig HAL) is the only layer that knows about hardware. Test code in Layer 3 uses rig.can.send(...) and rig.can.expect(...) — not “socketcan” or “can0”. When you swap from a virtual backend to a PEAK CAN adapter, only the TOML changes. The test file is identical.

Key value props

Virtual-first

Every test runs against an in-process virtual backend before any hardware exists. CI works on day one.

Zero test changes

Switch from virtual to real hardware by changing one line in a TOML file. Test code is hardware-agnostic by design.

AI signal mapping

crucihil analyze maps AUTOSAR RTE and COM module identifiers to DBC signal names using AI — no more manual tracing.

Python-native

Tests are async Python functions. No proprietary scripting language. Use your existing editor, linter, and CI toolchain.

MCP-connected

Claude, Copilot, and Cursor can query rigs, run tests, and explain failures through the built-in MCP server.

Open core

Self-hosted free up to two rigs. No vendor lock-in. Bring your own AI key.

Stack

ComponentTechnology
Test runnerPython 3.10+, asyncio
Control planeFastAPI + PostgreSQL
Web dashboardReact 18 + TypeScript
AI interfaceFastMCP (MCP server)
ConfigTOML + Pydantic validation
CANpython-can, cantools

Next steps

Install CruciHiL

pip install crucihil or pip install 'crucihil[analyze]'

Run your first test

Five steps from install to passing test.