Keil Logo

Technical Support

On-Line Manuals

µVision User's Guide

About µVision User Interface Creating Applications Debugging Start Debugging Start Energy Measurement without Debug Application Program Execution Debug Windows and Dialogs Breakpoints Window Call Stack and Locals Window Code Coverage Command Window Component Viewer Disassembly Window Editor Window Event Recorder Setup Event Recorder Event Recorder Window Events Filtering Event Statistics Window Post-mortem Analysis Event Viewer Execution Profiler Instruction Trace Window System Analyzer Usage tips Save System Analyzer Contents Statistics Restrictions Logic Analyzer Setup Setup in Detail Restrictions Cortex-M Trace Configuration Memory Map Memory Window Performance Analyzer Registers Window Serial Window Debug (printf) Viewer Symbols Window System Viewer Adding System Viewer Windows System and Thread Viewer Thread States Toolbox Trace Data Window Trace Navigation Trace Exceptions Event Counters ULINKplus Window Watch Window Core Peripherals Cortex-M0 and Cortex-M0+ Nested Vector Interrupt Controller System Control and Configuration System Tick Timer Fault Reports (Cortex-M0+ only) Cortex-M3, Cortex-M4, and Cortex-M7 Nested Vector Interrupt Controller System Control and Configuration System Tick Timer Fault Reports Memory Protection Unit Cortex-M23/M33/M35P and Cortex-M55 Nested Vector Interrupt Controller System Control and Configuration System Tick Timer Fault Reports Memory Protection Unit Security Attribution Unit M-Profile Vector Extension (MVE) Debug Scripting Expressions Constants System Variables Peripheral Variables I/O Ports Serial Ports Program Variables (Symbols) Fully Qualified Symbols Non-Qualified Symbols Literal Symbols Using Symbols Line Numbers Bit Addresses Type Specifications Memory Attribution Specifiers Operators Differences between µVision and C Expression Examples Code and Data Trace (Cortex-M) Trace Features Configuring Trace Tracepoint Expressions Tracepoint Intrinsics Tracepoint Limitations Tracepoint Marks Tips and Tricks Review Peripherals and CPU Configuration Simulate I/O Ports Simulate Interrupts and Clock Inputs Simulate external I/O Devices Assign Serial I/O to a PC COM Port Check Illegal Memory Access Command Input from File Preset I/O Ports or Memory Contents Write Debug Output to a File Keyboard Shortcuts TPIU Initialization after RESET (Cortex-M) Prevent Opening Files Show Japanese Messages Debug Commands Debug Functions Simulation Flash Programming Dialogs Utilities Command Line Example Programs Appendix

Breakpoints Window

Breakpoints are program addresses or expressions that, when TRUE, halt program execution or execute a specified command. Breakpoints can be defined and modified in several ways:

Insert Breakpoint Button Using the Insert/Remove Breakpoint toolbar button. Select the code line in the Editor or Disassembly window and click the toolbar button or press F9.


  • Setting breakpoints is target specific. Switching from one target A to target B will make the breakpoints for target A go away.
  • You can kill breakpoints for a single target, a complete µVision project, or all projects in a multi-project workspace. Refer to Debug Menu and Commands.

Setting breakpoints using the dialog Debug - Breakpoints.

Breakpoint Control Dialog

Breakpoints describes the fields. This dialog allows to:

  • Define breakpoints of several types.
  • Temporarily enable or disable breakpoints using the tick-box in the field Current Breakpoints.
  • Review breakpoint definition by double-clicking the listed breakpoint.
  • Remove one or all breakpoints.

Expressions define the breakpoint type:

  • Access Break (A) gets defined when the flags Read, or Write, or both are set. The breakpoint is triggered when the specified memory access occurs. Specify the size of the memory access window in bytes or as object-size of the expression. For this breakpoint type, Expression must resolve to a memory address and memory type. The allowed operators (&, &&, <. <=. >, >=, = =, and !=) compare variable values before program execution is halted or executes the Command.
  • Execution Break (E) gets defined when Expression resolves to a code address. The breakpoint triggers when the specified code address is reached. The code address must refer to the first byte of a CPU instruction.
  • Conditional Break (C) is defined when Expression cannot be reduced to an address. The breakpoint triggers when the conditional expression becomes TRUE. The conditional expression is recalculated after each CPU instruction and could slow down program execution considerably.

The Count value specifies the number of times the breakpoint expression must evaluate to TRUE before the breakpoint triggers. After the first trigger, count is disregarded.

When a Command is specified, µVision executes the statement and then resumes program execution. The command specified in here can be a µVision debug- or signal function. To halt program execution from within such functions, set the System Variable _break_.


  • When an Access Breakpoint (read or write) is set to a peripheral register (SFR) in the Simulator, the breakpoint might trigger even though the application did not access the peripheral register. This happens because the µVision Simulator makes no difference between application-driven and Simulator-internal accesses.
Breakpoint Examples

Several breakpoint types defined in the picture are explaind below.

Expression: \Measure\125 Execution Break (E) that halts when the target program reaches the code line 125 in the module MEASURE.
Expression: main Execution Break (E) that halts when the target program reaches the main function.
Execution Break (E) that halts when the target program reaches the function save_current_measurements the 10th time.
printf ("T0 Interrupt Occurred")

Execution Break (E) that prints T0 Interrupt Occurred in the Output Window – Command page when the target program reaches the tc0 function.

sendchar == 96 Conditional Break (C) that halts program execution when the expression sendchar == 96 becomes true. This breakpoint is disabled in the above Breakpoints dialog.
Read Write
3 Objects
Access Break (A) that halts program execution when an read or write access occurs to save_record[10] and the following 2 objects. Since save_record is a structure with size 16 bytes this break defines an access region of 48 bytes.
sindex == 10
Access Break (A) that halts program execution when the value 10 is written to the variable sindex.
MyStatus ()
Execution Break (E) that executes the µVision debug function MyStatus when the target program reaches the function measure_display. The target program execution resumes after the debug function MyStatus has been executed.
(not in picture)
\\cpp_template\../../source/main.cpp\268 Execution Break (E) that halts when the target program reaches the code line 268 in the module main.cpp. The module has the relative path ../../source and belongs to the application cpp_template.
  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.