Embeddedice; Breakpoints And Watchpoints - Segger J-Link User Manual

Jtag emulators for arm cores
Hide thumbs Also See for J-Link:
Table of Contents

Advertisement

9.3

EmbeddedICE

EmbeddedICE is a set of registers and comparators used to generate debug excep-
tions (such as breakpoints).
EmbeddedICE is programmed in a serial fashion using the ARM core controller. It
consists of two real-time watchpoint units, together with a control and status regis-
ter. You can program one or both watchpoint units to halt the execution of instruc-
tions by ARM core. Two independent registers, debug control and debug status,
provide overall control of EmbeddedICE operation.
Execution is halted when a match occurs between the values programmed into
EmbeddedICE and the values currently appearing on the address bus, data bus, and
various control signals. Any bit can be masked so that its value does not affect the
comparison.
Either of the two real-time watchpoint units can be configured to be a watchpoint
(monitoring data accesses) or a breakpoint (monitoring instruction fetches). You can
make watchpoints and breakpoints data-dependent.
EmbeddedICE is additional debug hardware within the core, therefore the Embed-
dedICE debug architecture requires almost no target resources (for example, mem-
ory, access to exception vectors, and time).
9.3.1

Breakpoints and watchpoints

Breakpoints
A "breakpoint" stops the core when a selected instruction is executed. It is then pos-
sible to examine the contents of both memory (and variables).
Watchpoints
A "watchpoint" stops the core if a selected memory location is accessed. For a watch-
point (WP), the following properties can be specified:
Address (including address mask)
Type of access (R, R/W, W)
Data (including data mask).
Software / hardware breakpoints
Hardware breakpoints are "real" breakpoints, using one of the 2 available watchpoint
units to breakpoint the instruction at any given address. Hardware breakpoints can
be set in any type of memory (RAM, ROM, flash) and also work with self-modifying
code. Unfortunately, there is only a limited number of these available (2 in the
EmbeddedICE). When debugging a program located in RAM, another option is to use
software breakpoints. With software breakpoints, the instruction in memory is modi-
fied. This does not work when debugging programs located in ROM or flash, but has
one huge advantage: The number of software breakpoints is not limited.
J-Link / J-Trace (UM08001)
© 2004-2009 SEGGER Microcontroller GmbH & Co. KG
171

Hide quick links:

Advertisement

Table of Contents

Troubleshooting

loading
Need help?

Need help?

Do you have a question about the J-Link and is the answer not in the manual?

This manual is also suitable for:

J-trace

Table of Contents

Save PDF