Who is this for?

This is an introductory topic for embedded software developers new to the code-coverage feature in Keil MDK.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Set up project execution on FVP
  • Understand basics of the Code Coverage report

Prerequisites

Before starting, you will need the following:

  • Basic familiarity with Keil MDK

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll enable and use Keil MDK code coverage on a Cortex-M Fixed Virtual Platform (FVP). First, you’ll import and build the CMSIS-RTOS2 Blinky example for the ARMCM3 device using Pack Installer. Then, you’ll configure μVision debug to execute the application on the supplied Cortex-M FVP. After running the program, you’ll review the coverage results to see which lines and branches executed and identify untested paths, such as incomplete switch cases. You’ll focus on running with FVPs and learn how to interpret the basic code coverage report and decide what tests to add next.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
Which device and example should I select in Pack Installer?
Choose ARM > ARM Cortex M3 > ARMCM3, then on the Examples tab copy the CMSIS-RTOS2 Blinky (uVision Simulator) example. Open the copied project in MDK and build it.
How do I confirm the project is ready before running coverage?
Build the project and check that it completes without errors and produces an image. Ensure it runs on the selected target without immediate faults.
How do I make sure the application runs on the FVP rather than the default simulator or a board?
In the project’s debug settings, select the supplied Cortex-M FVP as the execution target. This Learning Path uses FVPs instead of real hardware.
What should I look for in the code coverage report?
Look for highlighted executed and unexecuted lines or branches. Verify that intended paths, such as all cases in a C switch statement, were exercised.
Can I use real hardware instead of an FVP for code coverage?
Yes, MDK supports code coverage on real hardware using instruction trace (ETM trace). You’ll use FVPs in this Learning Path. If you’re configuring hardware trace, follow MDK guidance.
Next