3.22222

3.2 | 9 ratings Rate this file 6 Downloads (last 30 days) File Size: 96.48 KB File ID: #14284
image thumbnail

Code Coverage Tool

by Mark Walker

 

15 Mar 2007 (Updated 03 Jun 2009)

Code Coverage Tool measures C statement coverage in generated code.

| Watch this File

File Information
Description

The Code Coverage Tool (CCT) measures C statement coverage in code built as a Real-Time Workshop S-Function. It operates in conjunction with lcc (the C-Compiler that ships with the standard MATLAB installation). CCT inserts instrumentation code into the assembly source generated by lcc during a normal compile. This additional code logs when a line is executed in memory on the PC. When a simulation completes, the line execution counts are sent to the MATLAB base workspace.

A full description of CCT and installation instructions are included in the cct.zip download. See the file readme.html.

Required Products Embedded Coder
Simulink
Stateflow
Stateflow Coder
Real-Time Workshop
MATLAB release MATLAB 7.7 (R2008b)
Other requirements Windows 32 bit machines only.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
17 Mar 2007 kong sopheak  
19 Mar 2007 fa fa

very well

25 Mar 2007 saytu rachim  
26 Mar 2007 Abhay Bhisikar

Nice

28 Mar 2007 pranesh selvarangan

good.

30 Mar 2007 Venkata Chittem

This tool is giving line coverage information. But code coverage will be incomplete without a mention of MC/DC (Multiple conditions and Decision coverage) information!

22 Apr 2007 Marcelo Estrella  
16 Oct 2007 srikantan kc

good -i'll try

31 Dec 2007 Krishan Kumar

It gives the coverage of the last run, it doesn't give coverage for the cumulative run as in model coverage.

Please login to add a comment or rating.
Updates
16 Mar 2007

Path bug found in cct_setup.m during testing. A file separator was missing when toolroot was expanded.

01 Apr 2007

Main reason is original submission only worked with R2006a. This version contains an installer to allow CCT to work on R2006a and R2006b.

Pre-built files have been added to improve usability also.

19 May 2009

Compatibility updates with R2008b and R2009a (HTML formatting and data communication with MATLAB workspace). I have added a makefile so that the compiler interceptor executables can now be built by lcc from the supplied sources.

03 Jun 2009

cct_setup so build works when there are spaces in the path.
Added the html files in for a typical build.
cct_setup now forces "Generate Report" on, so there is a file to put the coverage in.

Tag Activity for this File
Tag Applied By Date/Time
realtime workshop Mark Walker 22 Oct 2008 09:04:30
embedded code Mark Walker 22 Oct 2008 09:04:30
verification Mark Walker 22 Oct 2008 09:04:30
c0 Mark Walker 22 Oct 2008 09:04:30
statement Mark Walker 22 Oct 2008 09:04:30
sil 61508 Mark Walker 22 Oct 2008 09:04:30
vv Mark Walker 22 Oct 2008 09:04:30
178b Mark Walker 22 Oct 2008 09:04:30
defstan Mark Walker 22 Oct 2008 09:04:30
production Mark Walker 22 Oct 2008 09:04:30
misra Mark Walker 22 Oct 2008 09:04:30
embedded code Alecsander Eitan 20 Jul 2010 10:44:22
defstan Alecsander Eitan 20 Jul 2010 10:44:26

Contact us at files@mathworks.com