B.3. Breakpoint and watchpoint allocation algorithm

This simplified algorithm illustrates the basic process that Multi-ICE follows to map your breakpoints and debugger internal breakpoints on to the available hardware resources:

  1. Any hardware breakpoint resources currently allocated to you (see icebreaker_lockedpoints) are not used. They are considered as unavailable to Multi-ICE and are removed from the list of available hardware.

  2. Any watchpoints that have been requested are allocated next, followed by any breakpoints which are on ROM. (Both of these types require dedicated hardware resources.) If there are not enough hardware breakpoint units to set all of these then an error indicating that no more breakpoints or watchpoints can be set is displayed.

  3. The remaining breakpoints are assigned as hardware or software breakpoints. Preference is given to your breakpoints over debugger internal breakpoints, and your preference is taken from the value of sw_breakpoints_preferred, as follows:

    • If it is zero (the default), your breakpoints are allocated as hardware breakpoints if any breakpoint units are still free, or software if not.

    • If it is nonzero, your breakpoints are allocated as software breakpoints if possible. If it is not possible (for example, the location is in ROM), but a hardware breakpoint can be used instead, then it is used.

    If it is not possible to set a breakpoint, an error indicating that no more breakpoints or watchpoints can be set is displayed.

  4. Stepping breakpoints are allocated as hardware breakpoints if possible. This is so that:

    • stepping in/out of ROM does not change the allocation of every breakpoint

    • performance is improved.

For example, with a standard ARM7 core, assuming that none of your breakpoints are already set, vector_catch=0 and semihosting_enabled=0 (so no internal breakpoints are set), the behavior as breakpoints are added is as follows:

  1. The first of your breakpoints is hardware.

  2. When a second breakpoint is set, the first breakpoint is downgraded to software (if possible) and the second is made hardware.

  3. When subsequent breakpoints are set, the last breakpoint is hardware and all others are software.

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0048F
Non-Confidential