µVISION DEBUGGER: Set breakpoint on external flash memory region
Information in this knowledgebase article applies to:
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?
The Armv7-M architecture defines the Flash Patch and Breakpoint (FPB) unit that implements hardware breakpoints, which includes the following register types:
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.
Last Reviewed: Monday, January 13, 2020
of your data.