Executed properly and followed the below link steps.
Reference : https://mcuoneclipse.com/2021/09/19/tutorial-gnu-gcov-coverage-with-the-nxp-i-mx-rt1064/
Try to open "gcda" and "gcno" files using gcov profiling tool. (Below screenshot attached for "evkmimxrt1170_hello_world_demo_cm7" this example code)
Also try to open "FRDM-K64F_gcov_bm" already generated "gcda" and "gcno" files. But It's showing "0%" coverage data.
I think it's related to some plugins missed during a setup.
Can you guide which are plugins are mandatory to open ".gcda" and ".gcno" files.
Also, If you have a better solution then give me as soon as possible.
Board and Environment Details:
1). Board : evk i.MXRT1170
2). mcuexpresso IDE : MCUXpresso IDE v11.4.0 [Build 6237] [2021-08-06]
3). Gcov Library : GCov Integration 8.4.0.202109071933
4). SDK : 2.10.1 Version
Hello
Hope you are well. I was able to replicate this issue and found the same issue. This message was displayed when trying to open the gcno file and the coverage results were displayed in 0´s like the picture you attached:
To solve this, I opened the command prompt and executed "strings -v".
After doing this, the coverage data was captured correctly.
Please let me know if this solves your problem, if you have more questions do not hesitate to ask me.
Best regards,
Omar
I too am having this issue, also on an RT1170 EVM.
I tried the 'strings -v' suggestion, both in the instrumented file's folder and the project folder, but this did not seem to change anything. Are there any other things I could try or check?
(Also I wonder how requesting an executable's version would affect anything?)
Hello @robert_s
Make sure that MCUXpresso has the tool installed, otherwise, you have to install it.
It is also important to check that the corresponding binary utilities are on the IDE, you can refer to this post: https://mcuoneclipse.com/2017/06/18/adding-gnu-coverage-tools-to-eclipse/
Which message is displayed when you try to open the gcov files?
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar
Hi Omar,
Thank you for your response.
1) I do appear to have gcov installed (although I also have certificate problems if I try to install software via Help->Install. Our IT will likely be resticting this anyway.)
2) If I execute gcov from the command line it seems to execute for individual files, e.g.:
> gcov fsl_gpio.o
File '../drivers/fsl_gpio.c'
Lines executed:60.00% of 45
Creating 'fsl_gpio.c.gcov'
Cannot open source file ../drivers/fsl_gpio.c
File '../drivers/fsl_gpio.h'
Lines executed:100.00% of 3
Creating 'fsl_gpio.h.gcov'
Cannot open source file ../drivers/fsl_gpio.h
File '../drivers/fsl_clock.h'
Lines executed:85.71% of 7
Creating 'fsl_clock.h.gcov'
Cannot open source file ../drivers/fsl_clock.h
File 'C:/Users/T0042908/Documents/MCUXpressoIDE_11.4.0_6224/workspace_topsisx/RT1170_iled_blinky_cm7/CMSIS/cmsis_gcc.h'
Lines executed:0.00% of 3
Creating 'cmsis_gcc.h.gcov'
3) I use the 'NewLib' rather than 'NewlibNano' as it generates the coverage files in less than a minute as opposed to an hour!
Rather than setting the gcov flags (-ftest-coverage -fprofile-arcs) for the whole project I have tried setting them for individual files.
This resulted in a successful population of the coverage data for the selected files in the gcov view, however, when certain files are added it appears to cause the following error and this prevents and data being displayed. For example, board/board.c:
I have tried cutting bits out of this file (e.g. unused functions, #def'd code) but have not yet been able to determine what MCUXpresso/gcov does not like about it!
Regards,
Robert
Hi @Omar_Anguiano,
I thought I'd better give this post a kick as it's gone quite for a couple of weeks.
(Possibly this should be a separate problem/post.)
'gcov' tools is installed and for most files it works 'OK'(*), however, some files do cause the above 'Unhandled loop exception' error when the results are opened.
Thank you for any help you can provide,
Robert
(*) - Some of the results are wrong. I know this because I have stepped through some of the code it reports as not-executed!