In some example code, I've seen this coded with a '0' instead of a '4'. ARM documentation says:
"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.
In both ARM state and Thumb state, imm is ignored by the ARM hardware. However, a debugger can use it to store additional information about the breakpoint." [ARM Information Center]
So I'm curious if there is any particular reason for using '4'?
I'm also curious about what happens if a bkpt instruction is executed when there is no debugger connected. I assume this acts similar to either a NOP or a HALT but haven't found a description of this yet.
Thanks,
James