Debug in Depth
ARM DDI 0210C
Copyright © 2001, 2004 ARM Limited. All rights reserved.
B-47
B.13
Programming breakpoints
Breakpoints are classified as hardware breakpoints or software breakpoints:
Hardware breakpoints
Typically monitor the address value and can be set in any code, even in
code that is in ROM or code that is self-modifying.
Software breakpoints
on page B-48
Monitor a particular bit pattern being fetched from any address. One
EmbeddedICE-RT watchpoint can therefore be used to support any
number of software breakpoints. Software breakpoints can normally be
set only in RAM because a special bit pattern chosen to cause a software
breakpoint has to replace the instruction.
B.13.1
Hardware breakpoints
To make a watchpoint unit cause hardware breakpoints on instruction fetches:
1.
Program its address value register with the address of the instruction to be
breakpointed.
2.
For an ARM-state breakpoint, program bits [1:0] of the address mask register to
b11. For a breakpoint in Thumb state, program bits [1:0] of the address mask
register to b01.
3.
Program the data value register if you require a data-dependent breakpoint. (A
data-dependent breakpoint is one that matches the instruction code fetched as
well as the address.) Ensure that you clear all the bits in the data mask register.
If the data value is not required, program the data mask register to
0xFFFFFFFF
(all
bits set).
4.
Program the control value register with
nOPC
= 0.
5.
Program the control mask register with
nOPC
= 0.
6.
When you have to make the distinction between User and non-User mode
instruction fetches, program the
nTRANS
value and mask bits appropriately.
7.
If required, program the
EXTERN
,
RANGE,
and
CHAIN
bits in the same way.
8.
Program the mask bits for all unused control values to 1.
Содержание ARM7TDMI
Страница 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 276: ...Differences Between Rev 3a and Rev 4 C 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...