Keil Logo

SBC (only Cortex-M)

Use the Software Breakpoint Configuration (SBC) command to configure used debug memory accesses. SW breakpoints are BKPT instructions temporarily replacing code. You can also disable SW breakpoints with this command. Using SW breakpoints can spare HW breakpoint resources.

This command is supported by ULINKpro, ULINKproD, ULINK2/ME, and CMSIS-DAP. The command is NOT supported by the simulator.

Syntax Description
SBC Lists the currently set SW breakpoint configurations and their IDs.
SBC CLEAR * Removes all SW breakpoint configurations.
SBC CLEAR id Removes the SW breakpoint configuration with the index <id>.
SBC startAddr, endAddr, enable Define configuration for a memory range.
SBC startAddr, endAddr, enable, accsize Define configuration for a memory range.
SBC startAddr, endAddr, enable, accsize, alignment Define configuration for a memory range.

The table lists the parameter of the SW breakpoint command:

where:  
id is the index for the SW breakpoint. The numbers get reassigned for each add or remove operation. List the SW breakpoints before removing the next SW breakpoint.
startAddr is the start address of the memory block. If used with alignment and/or accsize, start address and defined range must be multiples of alignment and accsize.
endAddr is the end address of the memory block.
enable activate or deactivate SW breakpoints for a memory range. Set to 0 to deactivate the usage of SW breakpoints. Set to 1 to allow SW breakpoints.
accsize set a specific bus access size (in bytes) for SW breakpoint operations. Allowed values are: [0, 1, 2, 4]. If set to 0 (default), then the debugger decides which access size to use.
alignment specify alignment of SW breakpoint operations in bytes. Modifications of memory will occur in accordingly sized and aligned blocks. This can result in larger read-modify-write operations in order to set or clear a SW breakpoint. If set to 0 (default), the debugger decides which alignment to use (normally derived from the selected bus access size). The value must be a power of 2. If accsize is set, alignment must be a multiple of accsize. The maximum possible alignment is 1024.

For memory ranges without SBC definitions, SW breakpoints are enabled with accsize 0 and alignment 0.

Example
SBC 0x00000000, 0x00001FFF, 0
// Disable usage of SW Breakpoints for the address range 0x00000000-0x00001FFF.
// Debugger decides which bus access size and alignment to use.

SBC 0x10000000, 0x1000FFFF, 1, 1
// Set/remove SW breakpoints for the address range 0x10000000-0x1000FFFF
// using 8-bit bus accesses only.

SBC 0x10010000, 0x1001FFFF, 1, 0, 8
// Set/remove SW breakpoints for the address range 0x10010000-0x1001FFFF
// using 8-byte memory block access. Debugger decides which bus access size to use.
  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.