# Start debugging with µVision

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/)
- [Use basic run/stop debug](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/2_basics/)
- [Debug using Event Recorder](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/3_event_recorder/)
- [Debug using Serial Wire Viewer](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/4_swv/)
- [Advanced debug with ETM trace](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/5_etm_trace/)
- [Measure Power with ULINKplus](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/6_power_ulplus/)
- [Next Steps](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/uv_debug/_next-steps/)

## About this Learning Path

| Skill level:     | Advanced         |
|------------------|------------------|
| Reading time:    | 1 hr 30 min      |
| Last updated:    | 14 Aug 2026      |

| Author:                      | Christopher Seidl, Arm          |
|------------------------------|----------------------------------|
| Arm IP:                      | [Cortex-M](https://support.arm.com/?tab=compute-ip&Product%20Type=Microcontrollers) |
| Tags:                        | Performance and Architecture, RTOS, Baremetal, Keil MDK, FVP |

## Who is this for?
This is an advanced topic for software developers who want to debug microcontrollers using µVision.

## What will you learn?
Upon completion of this Learning Path, you will be able to:
- Use basic run/stop debug
- Learn advanced debug techniques using Event Recorder and Serial Wire Viewer
- Learn to use ETM Trace for optimum performance
- Measure your power consumption with ULINKplus

## Prerequisites
Before starting, you will need the following:
- Some familiarity with embedded programming is assumed
- An [Arm Account](https://developer.arm.com/register) is required
- A Windows machine
- Installation of [Arm Keil MDK](https://developer.arm.com/downloads) with an active MDK-Community license
- Installation of the [Corstone-300 Ecosystem FVP](https://developer.arm.com/documentation/graphics) 

### Summary
You’ll debug a Cortex-M Blinky application in µVision. First, you’ll build the project, start a debug session, and use hardware breakpoints. Then, you’ll use Event Recorder, Serial Wire Viewer (SWV), and Embedded Trace Macrocell (ETM) to inspect events, real-time data, execution history, and faults. Finally, you’ll use ULINKplus to measure core clock, power, and code-section performance.

## Frequently asked questions
<details>
<summary>How do I know the Blinky project built correctly before I start debugging?</summary>
Select **Build (F7)** and verify it completes without errors. When the build succeeds, select **Start a Debug Session (Ctrl+F5)** and **Run (F5)** the application.
</details>

<details>
<summary>What should I check if I don't see any SWV data?</summary>
SWV isn’t supported in simulation mode. Connect a debug adapter to real target hardware and use SWV there.
</details>

<details>
<summary>Where do Event Recorder printf messages appear, and what does my project need?</summary>
Event Recorder text appears in the **Debug (`printf`) Viewer** window. Your code must call the Event Recorder API or use components already annotated (such as MDK‑Middleware, Keil RTX5, or CMSIS‑FreeRTOS). Event Recorder requires some system RAM.
</details>

<details>
<summary>How do I limit ETM trace capture to a specific code region?</summary>
In the **Disassembly** window or C source, add a **TraceRun (ETM)** tracepoint where capture should start and a **TraceSuspend (ETM)** tracepoint where it should stop. µVision records instructions, branches, exceptions, and interrupts between those tracepoints.
</details>

<details>
<summary>How do I configure ULINKplus to capture power measurements?</summary>
ULINKplus adds core clock measurement and power measurement that you can use with Event **Event Statistics** to profile code sections. Configure the adapter with a debug initialization script that runs when debug mode starts. For board connections, refer to the ULINKplus documentation.
</details>
