Keil Logo

µVISION DEBUGGER: ACCESS BREAKPOINTS ON ABSOLUTE MEMORY WRIT


Information in this article applies to:

  • µVision Version 2.20

QUESTION

The µVision debugger offers access breakpoints that can halt program execution when an application writes to a specify memory location. It is possible to combine access breakpoints with a value when I have symbolic information from the C compiler. For example, I can define:

BS write myVar == 0x5A

This stops execution when the C program writes the value 0x5A to the variable myVar.

However, I want to stop execution when my assembler program writes 0xE8 to the xdata address X:0x0668. How can I define such a breakpoint?

ANSWER

Since the assembler program does not provide type information, you need to use the built-in functioons _RBYTE, _RWORD, _RDWORD, _RFLOAT, and _RDOUBLE to check the value that is stored in memory. You can then set the built-in debugger variable _break_ to halt program execution.

From the command line you may define such a breakpoint is defined as follows:

BS write X:0xE50, 1, "_break_ = (_RBYTE(X:0x668) == 0xEA)"

From the Debug - Breakpoints... dialog you can define this breakpoint with the following inputs:

  • Expression: X:0x668
  • Count: 1
  • Command: _break_ = (_RBYTE(X:0x668) == 0xEA)
  • Access: Write, Size=1 Bytes

MORE INFORMATION

  • Getting Started User's Guide

SEE ALSO

Last Reviewed: Tuesday, June 29, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.