This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printf problem


On Mon, 31 May 2010, Manuel Borchers wrote:
Hi all,

Hi Manuel,


it's me again with 'serial' problems ;)

I got the netX serial driver working quite fine. So the next step was
to try out printf (I was using diag_printf before, which works
flawlessly).

I enabled asserts, tracing and io init debugging. Stdio is still on
the default /dev/ttydiag (which works fine on the linux synthetic
target).

But on my real hardware, I directly get an assertion: ASSERT FAIL:
<3>stream.cxx[603]virtual Cyg_ErrNo Cyg_StdioStream::write() Stream
object is not a valid stream!

I debugged that a few days ago, so it's somewaht summed up out of my
mind:

I stepped a bit through the constructors that fire up stdin and
stdout.  The assertion seems to be raised because the magic word
hasn't been written. I trapped that down to the fact that the buffer
used by the stream has no size (i.e. is 0).

And that's the point were I left, because I had no idea, why this
could be the case.

I also tried routing STDIO to /dev/ser0 and /dev/tty0, which resulted
in the same assertion (but I didn't step into the constructors in
these scenarios).

Find my minimal minimal config's attached, I'm importing for the
scenario.

Those snippets are the very minimal configs :-)


As your HAL is freshmeat... And what your HAL global CFLAGS, LDFLAGS
are?  Do you use the same flags as another ARM9 targets use? May be
there are some odd things? Where your compiler (toolchain) came from?

Any hints on how to debug this any further or pointers what i'm
missing in my config are greatly appreciated.

About serial tests (though you said: 'the netX serial driver working quite fine'), if you looking for more tests, look at

io/serial/<version>/tests/README

Can you confirm that at the least that `serial1' test finished without
any failures on your target? Can you confirm also that all cyg_io* calls
(lookup, read, write, set/get config) work as you could expect on your
eCos serial device '/dev/serX'?

Sergei

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]