Datasheet
Semihosting
5-10 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI0058D
Figure 5-2 Semihosting with breakpoint
The error occurs because the vector table location for the SWI has not yet had the
application handler installed into it and might still contain the software breakpoint bit
pattern. Because the
$semihosting_vector
address has moved to a place that cannot
currently be reached, Multi-ICE no longer knows about the triggered breakpoint. To
prevent this from happening, you must change the contents of
$semihosting_vector
only
at the point in your code where the application SWI handler is installed into the vector
table.
Note
If semihosting is not required at all by an application, this process can be simplified by
setting
$semihosting_enabled
to 0.
5.3.5 Multi-ICE DCC semihosting
When using the DCC semihosting mechanism, adding an application SWI handler must
be done in exactly the same way as non-DCC semihosting (see Multi-ICE on page 5-8).
0x100
0x104
0x108
Program
Memory
SWI
0x00
0x04
0x08
Vector
Table
Reset
Software Interrupt
Prefetch Abort
Data Abort
Reserved
IRQ
FIQ
Undefined
0x0c
0x10
0x14
0x18
0x1c
Multi-ICE
Breakpoint
SWI Handler
...
0x448
0x44c
0x450
...
CMP r0,#1
...
LDMFD sp!, {...}
MOVEQS pc,lr
Semi_SWI
MOVS pc,lr
$semihosting_enabled = 1
$semihosting_vector = 0x450