![ARM Cortex-M4 Generic User Manual Download Page 205](http://html.mh-extra.com/html/arm/cortex-m4/cortex-m4_generic-user-manual_2973228205.webp)
The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-158
ID121610
Non-Confidential
3.12.1
BKPT
Breakpoint.
Syntax
BKPT #
imm
where:
imm
Is an expression evaluating to an integer in the range 0-255 (8-bit value).
Operation
The
BKPT
instruction causes the processor to enter Debug state. Debug tools can use this to
investigate system state when the instruction at a particular address is reached.
imm
is ignored by the processor. If required, a debugger can use it to store additional information
about the breakpoint.
The
BKPT
instruction can be placed inside an IT block, but it executes unconditionally, unaffected
by the condition specified by the
IT
instruction.
Condition flags
This instruction does not change the flags.
Examples
BKPT #0x3
; Breakpoint with immediate value set to 0x3 (debugger can
; extract the immediate value by locating it using the PC)
Note
ARM does not recommend the use of the BKPT instruction with an immediate value set to
0xAB for any purpose other than Semi-hosting.