IET
Decrease font size
Increase font size
Topic Title: How to get code coverage for embedded C code ?
Topic Summary:
Created On: 22 February 2012 08:20 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 22 February 2012 08:20 AM
User is offline View Users Profile Print this message



kushigowda

Posts: 1
Joined: 22 February 2012

I'm working as trainee in QA dept, here i am supposed to get the code coverage report for embedded C code written by our developers. I have installed CYGWIN tool and ECLIPSE IDE , where i have learnt to get the code coverage report for simple C programs , but i'm getting so many errors as i tried with embedded C code .
I know some of the commercial tools are available to get code coverage for embedded C , but here i am allowed to use only CYGWIN tool ( GCC ,gcov ).
So please , can any one help me out to get code coverage report for embedded C ?
Any suggestions given related to this topic would help me a lot.
 24 February 2012 08:06 AM
User is offline View Users Profile Print this message



coombes

Posts: 1
Joined: 24 February 2012

The major challenge with measuring code coverage for embedded platforms instead of measuring it on a PC is that most coverage tools are designed to work with code running on a PC: they rely on (effectively unlimited) memory, and the ability to dump the memory to a file which can be examined afterwards.

To do coverage on an embedded platform, you need to either:
* Build the embedded code to run on the PC in some kind of test harness, where you can use an off the shelf tool like gcov or
* Work out how to do code coverage on the embedded target, overcoming the limitations that it provides (limited memory, pulling the data off afterwards,...)

My suggestion is that you're probably better off doing the former.

If you do need to go down the second route, you're faced with adapting the tools you have or going down the commercial tools route (here I probably should mention my employer, Rapita Systems (Link removed) provide a tool specifically designed for collecting coverage of embedded systems).

Out of interest, what type of code coverage are you aiming to measure - statement coverage?
Statistics

See Also:



FuseTalk Standard Edition v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.