This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GDB stubs in ROM?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]