[ECOS] GDB-stub in Redboot fails to handshake

Andrew Lunn andrew@lunn.ch
Thu Mar 6 08:26:00 GMT 2008


On Sat, Mar 08, 2008 at 05:09:30AM -0800, Les G. Miklosy wrote:
> Hello Gents: 
> 
> As you can see in this gdb log file, my Sparc target running Redboot fails to 
> recognize ($#00) the simple query commands offered by my Linux host over a 
> serial connection. 

The redboot stub only implements a subset of the gdb protocol. 

> The target application is simply hello-world with a linked 
> library build from ECOS version 1.0.7. Redboot is a ROMRAM bootloader also 
> built from version 1.0.7. I can hear you smacking your foreheads asking why 
> use V 1.0.7 , I am using this version because a board support package was 
> built around it.
> 
> I tried the execution of Redboot with and without a '$' to start the GDB-stub 
> with no improvement. Any application I try to load/continue ends with a 
> Signal Hangup.  A diff between ECOS version 2.0 and 1.0.7 shows many changes 
> to the code particularly the part for initiating gdb-stub. Is this old 
> version suspect? Does the solution demand an upgrade to 2.0 or shall I debug 
> 1.0.7?
> 
> Thanks for any guidance,
> Les
> 
> 
> 
> w +$Hc-1#09
> r -
> w $Hc-1#09
> r <Timeout: 2 seconds>
> w $Hc-1#09
> r $#00
> w +
> r $#00
> w +
> r $#00
> w +
> r $#00
> w +
> r <Timeout: 2 seconds>
> 
> ... repeats
> 
> 
> c load
> w $X41000000,0:#73
> r +$OK#9a
> 
> ... load application hello-world
> 
> 
> Sending packet: $p42#d6...[+]Ack
> [$][0][0][0][0][0][0][2][0][#][8][2]Packet received: 00000020
> Sending packet: $p43#d7...[+]Ack
> [$][4][0][0][0][0][0][5][0][#][8][9]Packet received: 40000050
> 
> ...
> 
> Sending packet: $C01#a4...[+]Ack
> [$][T][0][1][4][4][:][4][0][0][1][8][c][1][c][;][0][e][:][0][0][0][0][0][0][0]
> [0][;][#][1][0]Packet received: T0144:40018c1c;0e:00000000;

That fact that it is downloading suggests the stub is working.  

This line T0144:40018c1c;0e:00000000; indicates it has thrown an
exception. My guess is you are downloading your hello world image over
the top of redboot. What RAM addresses does your application image
use? What RAM does redboot use?

Newer versions of redboot would probably give you a warning you are
about to stomp of it, but something as old as 1.0.7 probably does not
have the check.

     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



More information about the Ecos-discuss mailing list