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]

Re: Gdb 6.7, gcc 4.2.2, redboot on arm (gba), "target remote" doesn't work.


On Sat, Jan 12, 2008 at 11:52:34PM +0100, Paul Chavent wrote:
> Hello.
> 
> I try to use redboot on a Game Boy Advance (arm). I use the latest
> release of ecos found on cvs with my own hal.
> 
> When i try to use gdb for running the twothreads example i have the
> following problem in gdb :

<snipped>
> (gdb) set remotebaud 57600
</snipped>
		       ^^^^^ 
GDB/Redboot hasn't use any flow control on it's own serial channels. Try
to decrease the baud rate definitions in your ECCs and rebuild the
RedBoot and eCos application. Usually, it's to set the baud rate grater
than 38400 bps is not good idea.

> The toolchain is built on gcc 4.2.2 :

Nowadays, I use the 3 toolchains for ARM targets to build eCos. That's
official and _stable_ toolchain from eCosCentric (that's based on the
GCC-3.2.1 and GDB-5.3); and 2 set of the home cooked tools: (they are
based on the GCC-3.4.6+GDB-6.5 and GCC-4.2.2+GDB-6.7.1). I have no
problems to debug the eCos applications on Linux host via USB-2-serial
(FTDI) driver (I noticed your reference: /dev/ttyUSB0).

> So i think, the problem is that gdb can't talk with redboot. Do you
> think it is a problem from the toolchain or from redboot or from my
> hal implementation ?

It seems for me, that's the second. Did you try to play with the old
toolchain at first? That exists in binaries. If you did and had same
problem with old toolchain (GDB-5.3), I think that any more modern
toolchains won't be able to work with a bad configured, designed HAL.

I don't vote for old toolcahin (and GCC-3.4.6 and GCC-4.2.2 beat the old
GCC-3.2.1), but I vote for a smooth GNU debugging :-) We have a right to
expect from new toolchain (GDB) no timeouts, no resets, no fails even if
we run a batch

    $ find install/tests -type f -exec arm-elf-gdb -batch \{} \;

This quite works for my ARM7TDMI-S targets with GDB 5.3/6.5/6.7.1.

But I found that with the Linux USB-to-serial driver need to drop
/dev/ttyUSB0 once before a first GDB connection

    $ stty ispeed 38400 ospeed 38400 icanon -F /dev/ttyUSB0
    $ cat /dev/ttyUSB0

Push a RST button and you have to see RedBoot's banner on your concole,
then press C-C to break a read the /dev/ttyUSB0 and run a GDB session.

Sergei


-- 
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]