Compliance & Verification

# DO-178C firmware testing and traceability workflows

Shift requirements-based firmware testing and fault-response checks left onto deterministic digital twins before target-hardware rig time.

Avionics teams working toward DO-178C objectives spend scarce target-rig hours debugging basic peripheral and fault-handling defects that could be caught at pull-request time. CircuitTwin executes the target ARM ELF with pinned hashes, deterministic virtual clocks and air-gapped offline licences (up to 30 days on Team/Enterprise).

CircuitTwin is an engineering verification tool, not a DO-330 qualified verification tool; use it for rapid pre-rig regression and traceability archives ahead of formal target-hardware credit runs.

## Pre-rig traceability artifacts

| Artifact         | Contents                                                   | How teams use it                                              |
| ---------------- | ---------------------------------------------------------- | ------------------------------------------------------------- |
| JSON run record  | ELF SHA-256, twin digest, verdict, virtual time, exit code | Link each test run to requirement ID and Git commit           |
| JUnit / SARIF    | Structured per-case pass/fail/inconclusive status          | Feed CI dashboards and ALM traceability importers             |
| lcov / Cobertura | Target-binary line/branch execution traces                 | Close dead-code and exception-handler gaps before rig testing |
| Offline licence  | Air-gapped execution up to 30 days                         | Run inside restricted defence/aerospace build enclaves        |

## Local CLI workflow

Shell — air-gapped traceable suite run

```
ct test run --offline --json --recheck \
  --junit reports/req-trace.xml \
  --cobertura reports/coverage.xml \
  tests/flight-control.suite.yaml
```

## Suite & fault configuration

tests/flight-control.suite.yaml

```
version: 1
board: nucleo-h743zi2
firmware: build/flight_ctrl.elf
tests:
  - name: REQ-IMU-014-redundant-failover
    faults:
      - at_ms: 500
        part: bmi088
        kind: bus_disconnect
        duration_ms: 100
    expect:
      console_contains: "REQ_IMU_014_PASS"
      exit_code: 0
```

## CI pipeline integration

CI — offline enclave runner

```
# Inside air-gapped build runner with CT_OFFLINE_LICENSE configured:
ct test run --offline --json --recheck --junit reports/req-trace.xml tests/flight-control.suite.yaml
```

## DO-178C object-code execution and fault coverage

Inspect executed instruction addresses on your actual compiled flight binary without instrumenting source code.

Source-level gcov instrumentation alters compiler optimization, stack usage and timing. Avionics teams checking object-code branches need execution traces from the unmodified compiled ELF.

CircuitTwin records executed PC traces and fault-branch triggers on the exact target binary so engineers verify defensive error paths before formal target-hardware credit runs.

### Object-code trace capabilities

| Capability                 | CLI flag                | Engineering use                                                 |
| -------------------------- | ----------------------- | --------------------------------------------------------------- |
| Deterministic trace record | \--record trace/        | Capture exact executed instruction/event stream                 |
| Fault-branch activation    | suite.yaml faults       | Force defensive hardware-error branches usually dead on benches |
| Zero-instrumentation ELF   | ct run build/flight.elf | Run exact release optimization flags (-O2/-Os)                  |

Shell - capture execution trace on target ELF

```
ct run --json --board nucleo-h743zi2 --record trace/ build/flight_ctrl.elf
```

tests/avionics-defensive.suite.yaml

```
version: 1
board: nucleo-h743zi2
firmware: build/flight_ctrl.elf
tests:
  - name: baro-spi-disconnect-branch
    timeout_ms: 2500
    faults:
      - at_ms: 120
        part: ms5611
        kind: bus_disconnect
        duration_ms: 50
    expect:
      console_contains: "BARO_FAIL_BRANCH_TAKEN"
      exit_code: 0
```

## Troubleshooting checklist

| Symptom                                             | Fix                                                                                                            |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| Requirement IDs missing from CI output              | Prefix every suite test name with your ALM requirement ID (e.g. REQ-IMU-014-...) so JUnit carries it verbatim. |
| Unmodelled peripheral masks hardware behaviour      | Never suppress exit code 4 on traceability runs; log every unmodelled access for physical target-rig coverage. |
| Runner has no outbound internet access              | Provision an offline licence token (Team/Enterprise) and pre-cache board/sensor twins in the enclave.          |
| Timing margins need silicon sign-off                | Treat twin timing bands as estimates; execute WCET sign-off on physical target hardware.                       |
| Error handler branch never executes in normal tests | Inject SPI disconnect, register override or NACK faults at exact timestamps to exercise every defensive path.  |
| Trace files grow too large in CI                    | Keep fault suites short (1-3 s virtual time) and archive traces only on release branches.                      |

## Frequently asked questions

| Question                                                                         | Answer                                                                                                                                       |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Does running on CircuitTwin replace formal DO-178C target-hardware verification? | No. Use CircuitTwin to exercise defensive fault branches and catch regressions on every commit prior to formal target-hardware verification. |

## Related boards & component twins

[Board: nucleo-h743zi2](https://circuittwin.ai/boards/nucleo-h743zi2) [Board: nucleo-f767zi](https://circuittwin.ai/boards/nucleo-f767zi) [Board: teensy-4-1](https://circuittwin.ai/boards/teensy-4-1) [Twin: BMI088](https://circuittwin.ai/twins/bmi088) [Twin: BMP388](https://circuittwin.ai/twins/bmp388) [Twin: DPS310](https://circuittwin.ai/twins/dps310) [Twin: MS5611](https://circuittwin.ai/twins/ms5611) [Twin: ICM-42688-P](https://circuittwin.ai/twins/icm-42688-p) [Compliance support & offline licences](https://circuittwin.ai/docs/compliance) [Evidence standing definitions](https://circuittwin.ai/docs/accuracy) [DO-178C traceability overview](https://circuittwin.ai/guides/do-178c-firmware-traceability)

## More in Compliance & Verification

[EU Cyber Resilience Act (CRA) firmware testing evidence](https://circuittwin.ai/guides/eu-cra-firmware-testing-evidence) [ISO 26262 firmware fault-injection & traceability support](https://circuittwin.ai/guides/iso-26262-firmware-verification) [FDA Section 524B medical device firmware testing support](https://circuittwin.ai/guides/fda-524b-medical-device-cybersecurity-testing) [IEC 62443-4-2 industrial security robustness testing](https://circuittwin.ai/guides/iec-62443-4-2-embedded-security-testing)

> ## Run this workflow on your own ELF
>
> Start free on CircuitTwin to run local board twins, fault matrices and CI checks with zero per-run credits.
>
> [Start now](https://app.circuittwin.ai/try) [Read the quickstart](https://circuittwin.ai/docs/quickstart) [Connect a coding agent](https://circuittwin.ai/docs/agents)
