gcov issue in CW IDE 10.3!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gcov issue in CW IDE 10.3!

Jump to solution
736 Views
anand-k
Contributor III

Hi,

I am trying to use 'gcov' gnu utility for Code coverage analysis.I am using CW IDE 10.3.

I am getting error when I run my project for coverage check.

1.png

Could anyone suggest me on this?

Regards,

Anand K

Labels (1)
0 Kudos
1 Solution
471 Views
BlackNight
NXP Employee
NXP Employee

Hello,

gcov wants to write to file. That's why it is asking for fprintf() and things like fopen(). You must provide these functions or any other means to get your data off the target. You might consider to add things like SD-Card support and FatFS to your project. But keep in mind that gcov will be intrusive, so the runtime behaviour of your application might change.

I hope this helps.

View solution in original post

0 Kudos
3 Replies
472 Views
BlackNight
NXP Employee
NXP Employee

Hello,

gcov wants to write to file. That's why it is asking for fprintf() and things like fopen(). You must provide these functions or any other means to get your data off the target. You might consider to add things like SD-Card support and FatFS to your project. But keep in mind that gcov will be intrusive, so the runtime behaviour of your application might change.

I hope this helps.

0 Kudos
471 Views
anand-k
Contributor III

Hello Eric,

Is there any other Code Coverage analysis tool/plugin that I can Integrate to my eclipse based IDE? This will be much helpful for my project!

Thanks for your quick replies,

Anand K

0 Kudos
471 Views
BlackNight
NXP Employee
NXP Employee

If you have plenty of RAM available, you still could use gcov: simply implement instead of file I/O routines ones which write to RAM, then stop the target and dump the RAM content to the host.

Another solution would be to use a trace probe like the P&E TraceLink (First Steps with the P&E Tracelink | MCU on Eclipse). Such a probe has internal RAM and can collect data directly from the target.

It all depends how much intrusive your analysis can be: if you have a realtime application, you need to invest in hardware. If your application is not hard realtime or can deal with long delays, then an approach with instrumented application (and dump to a slower connection) could be feasible.

0 Kudos