public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] GDB stubs in ROM?
@ 2006-09-11  4:31 Sarah A Bailey
  2006-09-11 10:34 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Sarah A Bailey @ 2006-09-11  4:31 UTC (permalink / raw)
  To: ecos-discuss

Greetings,
I've been working on code that uses eCos on the LPC2148.  My question
is fairly straightforward:  Can I run GDB stubs if I build eCos in
ROM?

The answer seems to be no so far, but I thought I'd double check with
other developers.  I searched the internet and mailing lists for an
answer, but the best I could find was from the eCos mailing list.[1]
It basically said it's fairly difficult, and requires hardware support
for hardware breakpoints.

I've tried compiling eCos with GDB stubs in ROM, but I cannot set
software or hardware breakpoints in the code.  I also can't continue.
Example:


(gdb) set debug remote 1
(gdb) hbreak cyg_user_start
Hardware assisted breakpoint 1 at 0x5fc: file blinky.c, line 90.
(gdb) continue
Continuing.
Sending packet: $Z0,89fc,4#50...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m89fc,4#07...Ack
Packet received: 0000a0e3
Sending packet: $X89fc,0:#28...Ack
Packet received: OK
binary downloading suppported by target
Sending packet: $X89fc,4:\001\000\237ï#bb...Ack
Packet received: E03
Sending packet: $Z1,5fc,4#15...Ack
Packet received:
Packet Z1 (hardware-breakpoint) is NOT supported
Warning:
Cannot insert breakpoint -2.
Error accessing memory address 0x89fc: Input/output error.
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.


0x89fc is the address of main().  I had to explicitly call
breakpoint() in order for the GDB stubs to work at all.  If I didn't
explicitly call breakpoint(), the hardware wouldn't respond to any GDB
packets and CTRL-C would not stop the processor.

I'm planning on getting a JTAG tool, but I was hoping to get some work
done before it arrives.  It would be difficult to debug without GDB.

Sarah Bailey

[1] http://sources.redhat.com/ml/ecos-discuss/2003-03/msg00179.html

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] GDB stubs in ROM?
  2006-09-11  4:31 [ECOS] GDB stubs in ROM? Sarah A Bailey
@ 2006-09-11 10:34 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2006-09-11 10:34 UTC (permalink / raw)
  To: Sarah A Bailey; +Cc: ecos-discuss

On Sun, Sep 10, 2006 at 09:31:43PM -0700, Sarah A Bailey wrote:
> Greetings,
> I've been working on code that uses eCos on the LPC2148.  My question
> is fairly straightforward:  Can I run GDB stubs if I build eCos in
> ROM?
> 
> The answer seems to be no so far, but I thought I'd double check with
> other developers.  I searched the internet and mailing lists for an
> answer, but the best I could find was from the eCos mailing list.[1]
> It basically said it's fairly difficult, and requires hardware support
> for hardware breakpoints.

With ROM applications you need hardware support for breakpoints. Most
ARM platforms support two such breakpoints, but you need a JTAG
interface to place them. The gdb stub in a ROM application is only
useful for catching exceptions. 

       Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-11 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11  4:31 [ECOS] GDB stubs in ROM? Sarah A Bailey
2006-09-11 10:34 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).