GNU Coverage (gcov) for an Embedded Target with VS Code

The article explains how to use GNU gcov (coverage) with an embedded system, utilizing Visual Studio Code. It outlines the requirement of VS Code version, toolchain, semihosting, and a debug probe. Specific details are given on linking libraries, instrumenting source files, platform configuration, etc., with example provided on GitHub. The process offers the possibility to generate test coverage data for the software, which can be viewed within VS Code via the Gcov Viewer and coverage reports generated using gcovr utility. Continue reading