nasa-jpl/embedded-gcov
关于
从实际运行的嵌入式系统中提取 GCC/gcov 代码覆盖率数据,无需文件系统、操作系统或标准 C 库。
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文GCC/gcov code coverage data extraction from the actual embedded system, without requiring a file system, or an operating system, or standard C libraries.
See the PDF slide file in the repo for an overview, and see the github wiki for more information about customization options for your embedded system. Also see the simple Linux-compilable example in the repo.
Embedded gcov: Insert in your code
#include "gcov_public.h"
…
// want this as early as possible,
// but cannot call this until after
// the trap table and system stuff are set up
// may not be needed in all systems, depending on startup code
__gcov_call_constructors();
…
case 9: // a command in my system
__gcov_exit(); // dumps the data
break;
…
Add the embedded gcov source files gcov_public.c and gcov_gcc.c to your build.
You likely want a separate gcov build target, with preprocessor flags.
May need a separate linker file for gnu ld, defining symbols for __gcov_call_constructors().
Then compile with gcc and usual coverage flags -ftest-coverage -fprofile-arcs
探索相关项目
加载中…