[ECOS] stdout/stderr and CRLF translations...

Burl Nyswonger burl@nyswonger.org
Thu Oct 23 00:28:00 GMT 2003


Hi,

I am having some trouble figuring out how to get my default console
to use /dev/tty0.  I am using the PC architecture, and have set:

   CYGDAT_IO_SERIAL_I386_PC_SERIAL0_NAME == "\"/dev/tty0\""
   CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE == "\"/dev/tty0\""

I have the LIBC pacakge, SERIAL_DRIVERS, etc..

stdout/stderr work fine - I have confirmed that all stdio (in/out/err) is 
actually using the serial serial device (interrupt driven, etc.) and not
the diag stuff...

I have tried to set up tty0 by getting a handle with
'cyg_io_lookup(devname, &handle)' - which does not return an error -
I then set |= the flags with 'CYG_TTY_OUT_FLAGS_CRLF' (even though
this is part of the default value).

What seems to be happening is that none of the stdin/stdout I/O is going
through 'tty_write()' in 'io/serial/current/src/tty.c', but rather through
'serial_write()' which is located in 'io/serial/current/src/common/serial.c'.

I've tried to force stdout/stderr to '/dev/tty0' with fclose()/fopen()
stdout - freopen(...,stdout), etc.. all to no avail...

If I try to use cyg_io_lookup() and cyg_io_write(), I get the same results
(and I have confirmed that the writes are still not going through
tty_write(), but rather serial_write())

If anyone can help out, I'd appriciate it!

-- Burl.



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list