arm-elf-gdb hello & cygwin

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm new to all of this. I got the hello.c program to compile using the
procedures outlined at
http://billgatliff.com/articles/gnu/gnu-arm7t.html/x56.html and
related pages.

I purchased an AT91EB40A, and ran through the self tests. I then
plugged it into a win2k/cygwin computer and am trying to figure out
how to do stuff. I've never used gdb, but I thought that I need to do
the following:

1. arm-elf-gdb hello

2. (gdb) target rdi /dev/ttyS0

but I get: "could not device "dev/ttyS0". What am I doing wrong?

If I type "target sim" gdb says that I'm connected,  and the load
command works fine. And if I type "run" the program runs fine.

- William



Re: arm-elf-gdb hello & cygwin
I found another web page that said for cygwin do this:

2. set remotebaud 9600

3. target rdi com1


I tried that, but gdb hangs. Nothing else uses com1.
I'm running gdb 6.0.




On Thu, 16 Oct 2003 14:29:02 -0400, William Wuister

Quoted text here. Click to load it


Re: arm-elf-gdb hello & cygwin
Quoted text here. Click to load it


Oops, I should have read this first.
Are you using the right kind of cable?
Are you plugged into the correct serial port on the EB?
Is Angel actually running on the EB? (I don't know the 40A, but on the
40 there is a switch to boot from low or high memory; it has to be set
low to boot Angel).

Re: arm-elf-gdb hello & cygwin
I'm using the serial cable that Atmel supplied with the board.
Would gdb work better in linux than in cygwin?

On 16 Oct 2003 15:31:01 -0700, snipped-for-privacy@larwe.com (Lewin A.R.W. Edwards)
wrote:

Quoted text here. Click to load it


Re: arm-elf-gdb hello & cygwin
Quoted text here. Click to load it

The performance is pretty much the same. The main difference is that
if gdb hangs in cygwin, you have to kill the entire shell, whereas in
Linux you can ^Z and just kill the one process. Not much in it, really
:)

I just checked my book, and this is what I said about communicating
with the EB40:

Ensure that you have a STRAIGHT-THROUGH serial cable connected from
the SERIAL A port on the EB40 to your PC, and that the EB40's memory
switch SW1 is set to "LOWER MEM". Connect power to the EB40, press the
red reset button and you should see the yellow LED (LED2) illuminate,
indicating that Angel is running. Now open a shell prompt, [...] and
type:

arm-elf-gdb myprog.elf
set remotebaud 9600
target rdi /dev/ttyS0
load

[...] note that although Angel does support higher transfer speeds,
it's much more reliable when you run at 9600bps. Feel free to
experiment with speeds as high as 115200bps, but be prepared for the
debugger to hang[...]. The typical symptom is that you will see the
Angel sign-on message, then gdb will be hung hard; you'll need to kill
the process.



If you're not seeing the sign-on message I'd suspect either Windows is
screwing with you, or there is a cable/board problem. Use
Hyperterminal configured to 96008N1 direct connect, no flow control.
Power-cycle the board. Press Enter a few times in Hyperterminal. You
should see some garbage with the Angel sign-on text buried in it.

(Do you have Palm HotSync manager running, by any chance? Could it be
chewing the serial port even though you don't have a serial PalmOS
device?)

Re: arm-elf-gdb hello & cygwin
The good news is that the hyperterminal program worked. I see some
binary with "Angle ..." and "AT91EB40A...".

I can get into (gdb) and I can 'set remotebaud 9600'. But if I type
'target rdi /dev/ttyS0', gdb says "Could not open device /dev/ttyS0".

I read somewhere to use 'target rdi com1' in cygwin, which I tried
also, but then gdb hangs, but I do see one of the serial lights on the
eb40a flash, probably the same data that I saw in hyperterm going out.
I think that the problem has got to be the gdb that I have, which I
built from scratch from the current source code.

I don't have hotsync running or anything else that uses com1.

Your book arrived yesterday. I need to do some reading.

thanks,
William


On 17 Oct 2003 11:38:00 -0700, snipped-for-privacy@larwe.com (Lewin A.R.W. Edwards)
wrote:

Quoted text here. Click to load it


Re: arm-elf-gdb hello & cygwin
Quoted text here. Click to load it

Try /dev/com1

Also set baud 9600 before starting, otherwise gdb is likely to hang.
Angel+GDB=not entirely happy combination.

Site Timeline