[ECOS] Serial Port Configuration

Jonathan Larmour jifl@eCosCentric.com
Wed Feb 18 06:56:00 GMT 2004


Ali Rodgo wrote:
> Hello
> 
> the problem described below is now resolved.I had to create a new eCos
> configuration only with the Posix package and after that include the
> following, in order to avoid conflicts.

Good.

> With this, there is no error. But
> I had succefuly compiled my application but the program hangs up, do
> nothing.I have a breakpoint in main and open functions but the
> application doesn't enter on it. I am using Redboot and Insight. Any
> ideas?
> 
> Thanks in advance
> 
> 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.

Oh, and out of interest, O_NOCTTY is ignored by eCos as eCos doesn't 
support all that Unix-y process control terminal stuff with process groups, 
controlling terminals, etc.etc. You can include it, but it doesn't do anything.

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



More information about the Ecos-discuss mailing list