This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Serial Port Configuration
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Ali Rodgo <alirodgo at web dot de>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 18 Feb 2004 09:53:13 +0000
- Subject: Re: [ECOS] Serial Port Configuration
- References: <200402180828.i1I8SaQ05229@mailgate5.cinetic.de>
Ali Rodgo wrote:
My code: main() { struct termios newser1; fd1=open("/dev/ser1", O_RDWR |
IO_NOCTTY | O_NONBLOCK) ..... while(1) read(fd1,&data,1); ....... } My
eCos configuration: Posix, serial driver package
CYGPK_IO_SERIAL_TERMIOS0_DEV=/dev/ser0
CYGPK_IO_SERIAL_TERMIOS1_DEV=/dev/ser1
CYGPG_IO_SERIAL_ARM_AT91_SERIAL0=enable
CYGPG_IO_SERIAL_ARM_AT91_SERIAL1=enable
Are you also debugging on one of the serial ports? Given none of the AT91
eval boards we have ports for include ethernet debug, then I imagine the
answer is yes. If a port is being used for GDB traffic, you can't run a
serial driver on it.
Yes I am using GDB (Insight) for debugging on serial Port A(ser0) but the AT91EB40A has other serial port B (ser1) and on this serial port i want to read bytes sent from a Host, the code is above described. But why doesn't my programm enter in main() function?
What it means is that you shouldn't install a driver on ser0 because you
are using that port for GDB. Only install one on ser1. Did you enable
CYGPKG_IO_SERIAL_DEVICES by the way? And CYGPKG_IO_SERIAL_TERMIOS?
Is there information about ethernet debugging on the AT91EB40A?
The EB40A doesn't have ethernet (which was my point :-)).
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
Visit us at Embedded World 2004, Nürnberg, Germany, 17-19 Feb, Stand 12-449
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss