public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Bart Veer <bartv@redhat.com>
To: jkahkoska@wire-less-inc.com
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] assertion error in stdio
Date: Tue, 11 Jul 2000 06:37:00 -0000	[thread overview]
Message-ID: <200007111337.OAA01614@sheesh.cygnus.co.uk> (raw)
In-Reply-To: <007c01bfeab5$4adc6080$01b5a8c0@JamesLaptop>

>>>>> "James" == James Kahkoska <jkahkoska@wire-less-inc.com> writes:

    James> I am having a problem with eCos when I turn on asserts in
    James> eCos. I thought everything I/O related was working ok but
    James> when I turn on assertions, I get the following assertion
    James> error:

    <snip>

I am not an expert on this part of the system, but I can give a couple
of pointers.

All C library streams, including stdout, need to be mapped to an
underlying stream device such as "/dev/ttydiag". stdout is unusual in
that it needs to exist and be usable by the time the application gets
started, so it is necessary to select the target device at eCos
compile-time. This is achieved by the C library configuration option
CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE.

If at initialization time the device specified by this configuration
option is absent then you should get an assertion failure. Ideally it
would be possible to check at configure-time that the selected device
is going to be present, but that would require some CDL extensions. In
addition it would be necessary to cope with the possibility that the
default stdout device is provided by application code rather than by
an eCos package. 

So either CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE has been changed so that
it no longer corresponds to a valid device name, or you have disabled
the device driver corresponding to the default value. This default
value is "/dev/ttydiag", which should be provided by the common serial
package CYGPKG_IO_SERIAL. If you remove this common serial package
from the configuration then you are responsible for providing an
alternative stdout device. Note that it should always be possible for
the common serial package to provide at least one device which uses
the low-level HAL diagnostics routines to send output to the user
(whether by flashing morse code on an LED, or by other means).
Alternatively you may have manipulated a configuration option such as
CYGPKG_IO_SERIAL_TTY, CYGDAT_IO_SERIAL_TTY_CONSOLE or
CYGPKG_IO_SERIAL_TTY_TTYDIAG, and thus disabled or renamed
"/dev/ttydiag".

Anyway, the C library has been configured to use a particular device
for stdout and that device is not present at the time that stdout gets
initialized. Hopefully that will help you to figure out what is going
on in your specific case.

Bart Veer // eCos net maintainer

  reply	other threads:[~2000-07-11  6:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-10 14:22 James Kahkoska
2000-07-11  6:37 ` Bart Veer [this message]
2000-07-11  6:43   ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200007111337.OAA01614@sheesh.cygnus.co.uk \
    --to=bartv@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=jkahkoska@wire-less-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).