[ECOS] Problem with getchar / gets / fgets
Tue Sep 14 19:53:00 GMT 2004
I'm using eCos from latest CVS repository, in default configuration. So I'm
CYGPKG_IO_SERIAL_TTY = 1
CYGPKG_IO_SERIAL_HALDIAG = 1
CYGDAT_IO_SERIAL_TTY_CONSOLE = /dev/ttydiag
CYGPKG_IO_SERIAL_TTY_TTYDIAG = 1
Others options of component CYGPKG_IO_SERIAL are no active or default value
What is the real serial driver?
I'm not using GDB. I just launch my shell application with redboot and
communicate with my shell with minicom (as same as redboot).
From: Andrew Lunn [mailto:email@example.com]
Sent: Tuesday, September 14, 2004 3:12 PM
To: Nicolas Brouard
Subject: Re: [ECOS] Problem with getchar / gets / fgets
On Tue, Sep 14, 2004 at 02:37:23PM -0400, Nicolas Brouard wrote:
> I'm using a board based on a MPC860 processor.
> I try to make a shell application, but the getchar function (or gets, or
> fgets(stdin)) doesn't work very well. Each character requires to be hit
> about 5 to 10 times after which it shows up.
> The test I did is very simple and works perfectly with the powerpc
> target (psim).
> #include <stdio.h>
> static char line;
> int main(void)
> printf("toto> ");
> printf("%s", line);
> return 0;
> The same problem was posted before in the mailing list, and nobody
> Does anybody have an idea about that?
What serial driver are you using? haldiag or the real serial driver?
Is the port being shared with gdb or is it a dedicated port?
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