Keil Logo

µVISION DEBUGGER: Set breakpoint on external flash memory region


Information in this knowledgebase article applies to:

  • MDK v5.x
  • Armv7-M based Cortex-M devices

QUESTION

I'm trying to debug code running from the external flash memory on my Cortex-M4 based target device. When I try setting a breakpoint on an external flash memory address, I get the following error message:

Cannot set breakpoints(s).
- HW breakpoint: no support for this address.
- SW breakpoint: cannot write to memory.

How can I set a breakpoint on an external flash memory address?

ANSWER

The Armv7-M architecture defines the Flash Patch and Breakpoint (FPB) unit that implements hardware breakpoints, which includes the following register types:

  • A general control register FP_CTRL
  • A remap address register FP_REMAP
  • FlashPatch comparator registers

According to the specification of Armv7-M architecture, the REV, bits[31:28] of the FP_CTRL register defines the FPB unit version.

When the the REV, bits[31:28] has the value 0000, hardware breakpoints are only supported to be set on the first 0.5GB code memory region from 0x00000000 to 0x1FFFFFFF.

When the the REV, bits[31:28] has the value 0001, hardware breakpoints are supported to be set on the entire 4GB code memory region.

When the REV, bits[31:28] of the FP_CTRL register has the value of 0000, check the external flash memory address, where you want to set a breakpoint. If the address is above 0x1FFFFFFF, the hardware breakpoint cannot be set.

MORE INFORMATION

Last Reviewed: Monday, January 13, 2020


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.