Introduction to code coverage
Reasons for using code coverage
The code coverage functionality is useful when you design your test procedure to verify whether all parts of the code have been executed. It also helps you identify parts of your code that are not reachable.
Briefly about code coverage
The Code Coverage window reports the status of the current code coverage analysis for C or C++ code. For every program, module, and function, the analysis shows the percentage of code that has been executed since code coverage was turned on up to the point where the application has stopped. In addition, all statements that have not been executed are listed. The analysis will continue until turned off.
Note
Assembler code is not covered in the Code Coverage window. To view code coverage for assembler code, use the Disassembly window.
Requirements and restrictions for using code coverage
Code coverage is supported by the C-SPY simulator and by some hardware debugger drivers, and there are no specific requirements or restrictions. See Differences between the C-SPY drivers.