Keil Logo

Technical Support

On-Line Manuals

µVision User's Guide

About µVision User Interface Creating Applications Debugging Using the Debugger Simulation Start Debugging Application Program Execution Debug Windows and Dialogs Breakpoints Window Call Stack and Locals Window Code Coverage Command Window Component Viewer Disassembly Window Event Recorder Filter Component Levels Setup Event Recorder Event Viewer Execution Profiler Instruction Trace Window System Analyzer Restrictions Logic Analyzer Setup Setup in Detail Restrictions Cortex-M Trace Configuration Memory Map Memory Window Performance Analyzer Registers Window Serial Window Symbols Window System Viewer Adding System Viewer Windows System and Thread Viewer Thread States Toolbox Trace Data Window Trace Navigation 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 and Cortex-M33 Nested Vector Interrupt Controller System Control and Configuration System Tick Timer Fault Reports Memory Protection Unit Security Attribution Unit 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 Operators Differences between µVision and C Expression Examples Code and Data Trace (Cortex-M) Trace Features Tracepoint Expressions Tracepoint Intrinsics Tracepoint Limitations Configuring the Trace Hardware 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 Code Coverage Export MTB Trace Import for Code Coverage 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.

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_.

Note

  • 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.
Expression:
Count:
save_current_measurements
10
Execution Break (E) that halts when the target program reaches the function save_current_measurements the 10th time.
Expression:
Command:
tc0
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.

Expression:
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.
Expression:
Access:
Size:
save_record[10]
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.
Expression:
Access:
sindex == 10
Write
Access Break (A) that halts program execution when the value 10 is written to the variable sindex.
Expression:
Command:
measure_display
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.
Expression:
(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.