5.2.4. Multi-ICE

When using Multi-ICE in default configuration, semihosting is implemented as follows:

  1. O n ARM7 processors:

    1. A breakpoint is set on the SWI vector.

    2. When this breakpoint is hit, Multi-ICE examines the SWI number.

    3. If the SWI is recognized as a semihosting SWI, Multi-ICE emulates it and transparently restarts execution of the application.

      If the SWI is not recognized as a semihosting SWI, Multi-ICE halts the processor and reports an error.

  2. On other processors:

    1. Vector-catch logic traps SWIs.

    2. If the SWI is recognized as a semihosting SWI, Multi-ICE emulates it and transparently restarts execution of the application.

      If the SWI is not recognized as a semihosting SWI, Multi-ICE halts the processor and reports an error.

This semihosting mechanism can be disabled or changed by the following debugger internal variables:

$semihosting_enabled

Set this variable to 0 to disable semihosting. If you are debugging an application running from ROM, this allows you to use an additional watchpoint unit.

Set this variable to 1 to enable semihosting. This is the default.

Set this variable to 2 to enable Debug Communications Channel semihosting.

The S bit in $vector_catch has no effect unless semihosting is disabled.

$semihosting_vector

This variable controls the location of the breakpoint set by Multi-ICE to detect a semihosted SWI. It is set to the SWI entry in the exception vector table (0x8) by default.

If your application requires semihosting as well as having its own SWI handler, set $semihosting_vector to an address in your SWI handler. This address must point to an instruction that is only executed if your SWI handler has identified a call to a semihosting SWI. All registers must already have been restored to whatever values they had on entry to your SWI handler.

Multi-ICE handles the semihosted SWI and then examines the contents of lr and returns to the instruction following the SWI instruction in your code.

Regardless of the value of $vector_catch, all exceptions and interrupts are trapped and reported as an error condition.

For details of how to modify debugger internal variables, see the appropriate debugger documentation.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential