Keil Logo

µVISION DEBUGGER: Switching between HW and SW breakpoints


Information in this knowledgebase article applies to:

  • MDK-ARM v5.14 or later
  • Cortex-M

QUESTION

I have set a breakpoint on a specific RAM address, how can I force µVision debugger to set a hardware breakpoint in this case, instead of a software breakpoint?

ANSWER

With memory mapping enabled, µVision Debugger sets a software breakpoint or a hardware breakpoint based on the access rule for the memory at the chosen location.

By default, if you set a breakpoint in a RAM location, software breakpoint is used by a Breakpoint (BKPT) instruction inserted by debugger, which can spare limited hardware breakpoint resources (typically max. 6-8 hardware breakpoints). If the breakpoint is set in a ROM or flash location, hardware breakpoint in CoreSight unit is used.

In order to set a hardware breakpoint on a RAM location, you can use the SBC debug command to disable software breakpoints for a specific RAM memory range, which can force µVision debugger to use hardware breakpoint for this RAM memory range, e.g.

SBC 0x20000000, 0x00001FFF, 0

This will disable the usage of software breakpoints for the address range 0x20000000 - 0x00001FFF.

A typical use case to force µVision debugger to use hardware instead of software breakpoint is described here µVision DEBUGGER: Breakpoints are not hit when debugging in RAM.

On the other hand, note that it is only possible to set hardware breakpoints in ROM or flash memory range.

MORE INFORMATION

Last Reviewed: Thursday, June 7, 2018


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.