µVISION DEBUGGER: Switching between HW and SW breakpoints
Information in this knowledgebase article applies to:
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?
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.
Last Reviewed: Thursday, June 7, 2018
of your data.