Keil Logo

Code Coverage

Code Coverage Window ButtonThe µVision3 debugger provides a code coverage function that marks the code that has been executed. Code coverage helps to ensure you have thoroughly tested your application and helps you tune your testing strategy. You can use this feature to determine the sections of code that have not yet been exercised.

Code Coverage Dialog

The Code Coverage dialog provides information and statistics. You can output this information in the Output Window – Command page using the COVERAGE debug command.

In the debug window, lines of code that have been executed are marked as follows in the left column:

Code Coverage - No CodeNo Code - Lines with no code are marked with a light gray block.

Code Coverage - Unexecuted CodeUnexecuted Code - Unexecuted lines (instructions) are marked with a dark gray block.

Code Coverage - Fully Executed CodeExecuted Code - Fully-executed lines (instructions) are marked with a green block.

Code Coverage - Branch TakenBranch Condition True - A cyan (blue) block indicates that the condition for this branch instruction has only been true and the branch was always taken.

Code Coverage - Branch SkippedBranch Condition False - An orange block indicates that the condition for this branch instruction has never been true and the branch was never taken.

Note

  • A green block on a branch instruction indicates that both the true and false conditions have occurred.

Code Coverage Disassembly View

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.