How nasa-jpl/embedded-gcov works
Embedded gcov lets instrumented firmware collect GCC coverage counters and export them without requiring a filesystem, OS, or standard C library. The documented workflow is to initialize coverage constructors after system setup, then invoke the dump API when coverage should be extracted. Internally, the runtime tracks registered gcov data, converts it to gcda format, and emits it through configurable outputs. The excerpts show the conversion and output paths; optional output modes and constructor support are configuration-dependent. The example and post-processing scripts are not mapped because their contents were not sampled.
Main entry points: gcov_public.c Coverage registry · gcov_public.h Public coverage API · gcov_gcc.c gcda conversion · gcov_printf.c Serial formatter
Components 7
Firmware integration
- Instrumented firmware
- Public coverage API
code/gcov_public.h
Coverage runtime
- Coverage registry
code/gcov_public.c - gcda conversion
code/gcov_gcc.c
Output transport
- Coverage output
code/gcov_public.c - Serial formatter
code/gcov_printf.c - Host gcov tools
Connections 6
- Instrumented firmware → Public coverage API: calls init and dump
README.md - Public coverage API → Coverage registry: exposes runtime
code/gcov_public.h - Coverage registry → gcda conversion: converts coverage data
code/gcov_public.c - Coverage registry → Coverage output: emits gcda data
code/gcov_public.c - Coverage output → Serial formatter: formats serial output
- Coverage output → Host gcov tools: exports coverage data
README.md