arm-elf-gdb hello & cygwin

I'm new to all of this. I got the hello.c program to compile using the procedures outlined at

formatting link
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

  1. (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

Reply to
William Wuister
Loading thread data ...

I found another web page that said for cygwin do this:

  1. set remotebaud 9600

  1. target rdi com1

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

Reply to
William Wuister

Try /dev/com1

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

Reply to
Lewin A.R.W. Edwards

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).
Reply to
Lewin A.R.W. Edwards

Reply to
William Wuister

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?)

Reply to
Lewin A.R.W. Edwards

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

Reply to
William Wuister

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.