CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/embedded-coverage-strategy-reference

Use when deciding what code coverage level embedded C/C++ needs (statement, branch, MC/DC) and wiring gcov or llvm-cov into the build: host vs QEMU instrumentation, MISRA-C and DO-178C expectations by safety level, and report formats.

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

safety-standards-and-formats.mdreferences/

Safety-standard coverage expectations and report formats

Deep reference for the embedded-coverage-strategy-reference SKILL.md. Consult when negotiating a coverage target against a safety standard, or when choosing which report format to produce and gate on.

Safety-standard coverage expectations

These are cited by stable ID - the standards themselves are gated and not WebFetchable.

Standard / levelMinimum structural coverage
MISRA-C:2012 Coverage GuidanceNo prescribed numeric target; the rule set requires defined control flow and explicit default: in switch, which makes branch coverage achievable. See "MISRA-C:2012 §8 Coverage"
DO-178C / DAL A (catastrophic failure)MC/DC required for every condition (see "DO-178C §6.4.4 Structural Coverage")
DO-178C / DAL BDecision coverage
DO-178C / DAL CStatement coverage
DO-178C / DAL DNone mandated
ISO 26262 ASIL DMC/DC strongly recommended for unit verification (see "ISO 26262-6:2018 Table 12")
ISO 26262 ASIL A / B / CBranch (B/C) or statement (A) coverage
IEC 62304 Class C (medical, life-supporting)No numeric target, but bidirectional traceability + structural coverage justification expected

The number "100% MC/DC" in aviation is famously expensive; the standard accepts "MC/DC of the integrated executable object code" which is interpreted differently by certifiers. Treat these as the floor, not a turnkey recipe.

Coverage report formats

FormatProducerConsumer
.gcov (text)gcovHuman reading; line-level annotation
.gcov.json.gzgcov --json-formatCI parser; no source-code dependency per GCC docs
.info (LCOV)lcov --capture or llvm-cov export -format=lcovCodecov / Coveralls / SonarQube
.profdatallvm-profdata mergeInput only to llvm-cov
HTMLgenhtml (LCOV) or llvm-cov show -format=htmlHumans; not for diff'ing
JSONllvm-cov export -format=textCustom CI dashboards
Cobertura XMLgcovr --xml (gcovr is a third-party gcov wrapper)Jenkins coverage plugin

For embedded CI, the rule of thumb is: produce lcov.info as the durable artefact; render HTML for the developer; gate the PR on the .info totals.

SKILL.md

tile.json