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 is required
- A Windows machine
- Installation of Arm Keil MDK with an active MDK-Community license
- Installation of the Corstone-300 Ecosystem FVP
Summary
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.
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
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.
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.
SWV isn’t supported in simulation mode. Connect a debug adapter to real target hardware and use SWV there.
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.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.
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.