View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Code Coverage Tool

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

Code Coverage Tool


Mark Walker (view profile)


15 Mar 2007 (Updated )

Code Coverage Tool measures C statement coverage in generated code.

| Watch this File

File Information

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 download. See the file readme.html.

Required Products Simulink Coder
Embedded Coder
Stateflow Coder
MATLAB release MATLAB 7.7 (R2008b)
Other requirements Windows 32 bit machines only.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
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.

16 Oct 2007 srikantan kc

good -i'll try

22 Apr 2007 Marcelo Estrella

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!

28 Mar 2007 pranesh selvarangan


26 Mar 2007 Abhay Bhisikar


25 Mar 2007 saytu rachim

19 Mar 2007 fa fa

very well

17 Mar 2007 kong sopheak

16 Mar 2007

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

19 May 2009 1.2

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 1.5

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.

Contact us