This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Re: Hi there!
- From: Jesper Skov <jskov at redhat dot com>
- To: Jonathan Larmour <jlarmour at redhat dot com>
- Cc: Andrew Lai <laiandrew at cwc dot nus dot edu dot sg>,eCos discussion <ecos-discuss at sources dot redhat dot com>
- Date: 23 Apr 2002 08:20:02 +0200
- Subject: Re: [ECOS] Re: Hi there!
- References: <5.1.0.14.0.20020411171129.00a706d0@pop.harvard.net><4.2.2.20020422193009.018f69d0@postman.cwc.nus.edu.sg> <3CC3F835.BC2E896C@redhat.com>
On Mon, 2002-04-22 at 13:47, Jonathan Larmour wrote:
> Please CC the ecos-discuss list!
>
> Andrew Lai wrote:
> >
> > Hi there,
> >
> > Have been having trouble with printf and diag_printf() subroutines, I've
> > been using. This occurs with the twothreads.c example that has been
> > distributed with eCos.
> >
> > The following code fragment in twothreads.c:
> >
> > cyg_mutex_lock(&cliblock); {
> > printf("\nThread %d: and now a delay of %d clock ticks(%d)\n",
> > message, delay,x);
> > }
> > cyg_mutex_unlock(&cliblock);
> >
> > It produces the following output which is clearly wrong:
> >
> > Thread 0 w and now a delay of
> > now a delay of
> >
> > Note how the characters are being dropped intermittently and not being
> > displayed. I think I need to change something in the printf
> > routines......not sure what....
>
> It looks like the varargs support in the *compiler* has gone wrong in some
> way.
Sorry, no, IMO it looks like an unreliable serial connection is being
used, and characters are being dropped. I see something similar if I use
the CD drive under Linux while trying to use the serial connections.
Jesper
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss