I want to do code coverage on c++ source code on an embedded target. Basic idea is, generate an elf along with -frofile-arcs -ftest-coverage turned on using gcc. Download it onto an ARM device and then collect the data to analyze the code coverage using gcov.
How can I generate an elf file using arm-none-eabi-gcc commmand. I have setup the GNU ARM Toolchain and set the env variable. Can I use arm-none-eabi-g++ -c -mthumb -mcpu=cortex-m3 -fprofile-arcs -ftest-coverage filename.cpp -o filename.elf ?
Thanks in advance!