Reply by boje_d February 7, 20062006-02-07
--- In lpc2000@lpc2..., Tom Walsh <tom@...> wrote:
>
> boje_d wrote:
> 
> >Hi!
> >Is it possible to do debugging via one of the rs232 port?? i would 
> >like to use GDB to evaluate variables and make breakpoints on 
running 
> >HW.
> >  
> >
> Well, it is called "gdbserver" and requires running code to work.
 
You 
> might be able to put gdbserver into Flash and have
it download your 
> program-under-test into SRAM?  gdbserver would need you to write 
some 
> small code to use the serial port on the Target
system.  The 
current gdb 
> would have the driver needed.
> 
> IIRC, gdbserver is most effective on the X86 CPUs as they have 
internal 
> debug registers (breakpoint) accessible from
software. You cannot 
use it 
> like a jtag unit where it will debug programs in
flash or to 
program 
> flash. 
> 
> I don't know much more about it, try searching the archives of 
uClinux. 
> It was used on some of the processors without MMUs
or JTAG like the 
> Motorola ColdFire / 68EZ328.
> 
> TomW
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------
>
	Ill look into it. Thanks a lot
Boje Demant
	

An Engineer's Guide to the LPC2100 Series

Reply by Eric Engler February 3, 20062006-02-03
--- In lpc2000@lpc2..., "Anton Erasmus" <antone@...> wrote:
>
> On 2 Feb 2006 at 14:58, boje_d wrote:
> 
> > Hi!
> > Is it possible to do debugging via one of the rs232 port?? i would 
> > like to use GDB to evaluate variables and make breakpoints on running 
> > HW.
> 
> Yes, you need to load a GDB stub for the device. Source is available
for an
> ARM stub, but unless someone else has done it, you
need to write a
tx character
> and rx character routine. The normal stub will
support setting of
breakpoints in RAM.
> Debugging directly from flash is a bit more
involved.

This is harder than it sounds if you want breakpoints - even from RAM.
I'd probably try to get the Angel monitor working on the Arm chip,
then try to make gdb work with that. 

But Angel isn't officially supported on modern chips (the last source
I have is from 2002), and I don't know how hard it might be to make it
work. No matter how hard, it's likely going to be easier than doing it
all yourself.

Of course, buying a cheap wiggler clone from Olimex is a good way to
make gdb work with a JTAG interface.

Eric
	
Reply by Tom Walsh February 2, 20062006-02-02
boje_d wrote:

>Hi!
>Is it possible to do debugging via one of the rs232 port?? i would 
>like to use GDB to evaluate variables and make breakpoints on running 
>HW.
>  
>
Well, it is called "gdbserver" and requires running code to
work.  You 
might be able to put gdbserver into Flash and have it download your 
program-under-test into SRAM?  gdbserver would need you to write some 
small code to use the serial port on the Target system.  The current gdb 
would have the driver needed.

IIRC, gdbserver is most effective on the X86 CPUs as they have internal 
debug registers (breakpoint) accessible from software. You cannot use it 
like a jtag unit where it will debug programs in flash or to program 
flash. 

I don't know much more about it, try searching the archives of uClinux. 
It was used on some of the processors without MMUs or JTAG like the 
Motorola ColdFire / 68EZ328.

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------
	
Reply by Anton Erasmus February 2, 20062006-02-02
On 2 Feb 2006 at 14:58, boje_d wrote:

> Hi!
> Is it possible to do debugging via one of the rs232 port?? i would 
> like to use GDB to evaluate variables and make breakpoints on running 
> HW.

Yes, you need to load a GDB stub for the device. Source is available for an
ARM stub, but unless someone else has done it, you need to write a tx character
and rx character routine. The normal stub will support setting of breakpoints in
RAM.
Debugging directly from flash is a bit more involved.

Regards
  Anton Erasmus-- 
A J Erasmus
	
Reply by boje_d February 2, 20062006-02-02
Hi!
Is it possible to do debugging via one of the rs232 port?? i would 
like to use GDB to evaluate variables and make breakpoints on running 
HW.
Best regards 
Boje Demant