Hi. I want to set up code coverage for my ARM gcc project.
I am using the gcc toolchain that is being installed from this location:
https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
in a Docker container. I am using this to compile for an arm based microcontroller. The project uses arm-none-eabi-gcc as the compiler and arm-none-eabi-gcc-ar as the linker.
I tried adding -fprofile-arcs and -ftest-coverage to the CC Flags and -fprofile-arcs to the AR_FLAGS in my Makefile. When I try to run make, the linker produces this error: "arm-none-eabi-ar: two different operation options specified".
It is worth noting that the compilation of the individual files succeeds.
I next tried just invoking the following linker command by itself inside the Docker container:
arm-none-eabi-ar -fprofile-arcs
and I get that same error: "arm-none-eabi-ar: two different operation options specified".
How can I compile for code coverage testing with this toolchain? Is there a different set of flags that I should use to invoke arm-none-eabi-ar?
Thank you.
The package I am using is gcc-arm-none-eabi-7-2017-q4-major. As far as I can tell the code is compiled with gcc. It uses the compiler and linker from this package. Is there a way you can tell me that I can double check whether the ar executable utilizes gcov?