From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Veer 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 Message-id: <200007111337.OAA01614@sheesh.cygnus.co.uk> References: <007c01bfeab5$4adc6080$01b5a8c0@JamesLaptop> X-SW-Source: 2000-07/msg00104.html >>>>> "James" == James Kahkoska 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: 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