Code Coverage on RTEMS/LEON system
Scott Zemerick
scott at zemericks.com
Thu Jul 16 13:22:42 UTC 2020
Hello!
We are attempting to perform code coverage for an RTEMS based mission.
Specifically, we are running the Gaisler RCC toolchain/kernel for a
LEON/SPARC based system. Initially, we believed we could simply use the
GCOV/LCOV packages. The first issue we faced was what seems to be
compatibility issues with library versions or something of that nature. We
base that on some linker issues that seem related to the __gcov_flush
function being renamed __gcov_exit (or perhaps vice versa). We played some
tricks with the libgcov.a archive to rename the function to get past this
error as a temporary hack. Once we figured out the appropriate build flags
and verified the __gcov symbols existed in the executable, we were unable
to collect metrics (the gcda files were never generated). After further
investigation (inspection, attaching gdb, etc.), it appears the second
issue was that the implementations of all __gcov related functions are
empty. The gcc/libgcc/libgcov-interface.c file appears to contain the
definitions and it seems like during compilation the inhibit_libc macro
might have been set, which results in those functions being empty.
This leads to the following questions:
Is GCOV supported in RTEMS or is this a limitation of the specific
architecture? If supported, do you have any guidance? Perhaps we need to
move away from the Gaisler package and build the toolchain using
appropriate flags using the RTEMS source builder.
If not supported, are there any recommendations? We see the covoar tool
mentioned on the website but have no experience with it. Would that allow
executing software and producing artifacts similar to GCOV that can then be
read/analyzed? Do you have any references or examples of how to use?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200716/89d3a759/attachment.html>
More information about the users
mailing list