Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] OCD Debugger, hw breakpoint and flash

2005-06-29 by Bill Knight

On Wed, 29 Jun 2005 22:42:25 +0200, Micron Engineering wrote:

>Is there any hw interface that may set hw breakpoints on flash and also 
>may be interfaced with low cost debuggers as Insight?
>Massimo Manca, Micron Engineers

The processor itself will support two hardware breakpoints.  They can be
accessed from Insight.  I have the following in my .gdbinit file.

===================================================================================
# Define some macros for setting & clearing breakpoints using the EmbeddedICE logic
define ib
   monitor reg w$arg0av = $arg1
   monitor reg w$arg0am = 1
   monitor reg w$arg0dv = 0
   monitor reg w$arg0dm = 0xFFFFFFFF
   monitor reg w$arg0cv = 0x100
   monitor reg w$arg0cm = 0xFFFFFEF7
end

document ib
ib <idx> <addr>
Configures hardware Instruction Breakpoint <idx> (0 or 1 for ARM7TDMI)
to break at address <addr>.  To disable the breakpoint, set <addr> to
some address that won't be executed or use 'db <idx>'.
end

define db
   monitor reg w$arg0av = 0xFFFFFFFF
   monitor reg w$arg0am = 1
   monitor reg w$arg0dv = 0
   monitor reg w$arg0dm = 0xFFFFFFFF
   monitor reg w$arg0cv = 0x100
   monitor reg w$arg0cm = 0xFFFFFEF7
end

document db
db <idx>
Disable hardware instruction Breakpoint <idx> by setting it to 0xFFFFFFFF
end
====================================================================================

I didn't write the macros but have found them useful.  Other ARM toolsets like CrossWorks
for ARM by Rowley have debuggers which support the hardware breakpoints much more
cleanly than the above gdb macros

Regards
-Bill Knight
R O SoftWare &
http://www.theARMPatch.com

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.