Code Coverage

Updated in µVision4

The virtually unlimited stream of trace information enables MDK to provide complete Code Coverage of your program. Code coverage identifies every instruction that has been executed, ensuring thorough testing of your application. This is an essential requirement for complete software verification and certification. Code coverage marks code that has been executed helping to ensure you have thoroughly tested your application. It also provides support when tuning your testing strategy.

code coverage 1

Lines with no code are marked with a light grey block.
Unexecuted lines (instructions) are marked with a grey block.
Fully-executed lines (instructions) are marked with a green block.
Branches that have been taken are marked with a blue block.
Branches that have been skipped are marked with an orange block.
The next line to execute is marked with a yellow arrow.

The Code Coverage button on the toolbar toggles display of the Code Coverage dialog which shows you the percentage of instructions in your program that have executed.

code coverage dialog

You may save and restore coverage statistics for multiple debug sessions using the command line in the Output Window.

code coverage command line


  • The Code Coverage feature is only availabe when using µVision Device Simulation, or when debugging a Cortex-M based device with ETM Instruction Trace.
ARM Developer Resources

Looking for
Technical Information?

Developer Resources


We use cookies to give you the best experience on our website. By continuing to use our site you consent to our cookies.

Change Settings

Find out more about the cookies we set