This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Console setup and relation to haldiag device
- From: Brett Delmage <Brett dot Delmage at twobikes dot ottawa dot on dot ca>
- To: eCos discuss mailing list <ecos-discuss at sourceware dot org>
- Date: Wed, 22 Mar 2006 15:17:42 -0500 (EST)
- Subject: [ECOS] Console setup and relation to haldiag device
- Reply-to: Brett Delmage <Brett dot Delmage at twobikes dot ottawa dot on dot ca>
Maybe this should be obvious, but I don't recall seeing it anywhere. Is
the "console" that referred to, the device that is attached to stdin,
stdout, stderr?
Can the console and dev/haldiag device share the same UART? On my ARM
LPC-2214 device I have one external port connected to the UART; the
other serial port is connected to an internal modem.
I'd like to make sure my serial operations are working on the easily
tested external device first (I have a terminal connected to that), before
I try to talk to the internal device.
Right now I am seeing some initial setup messages on /dev/haldiag. See
below.
However when my application calls printf at the top of cyg_user_start in
the example program TwoThreads, I get an ASSERT. The associated trace is
below. I think the "console" or stdout is not set up at all. What options
do I need to configure for that?
I thought my printf was working yesterday, and then it stopped. But I
don't recall changing anything so am puzzled.
I find the doumentation of the virtual vectors and ROM/RAM loads a bit
confusing. Right now I am loading what I would consider a "ROM" image into
RAM for testing using a JTAG debugger. There is not intended to be any
linkage to redboot, external monitors, etc as that is not needed; I can
load the program via JTAG. I am not sure this configuration is related to
my stdout problem.
Any feedback appreciated. Thanks!
Brett
---------------------------------------------------------------
TwoThreads.c
void cyg_user_start(void)
{
printf("Entering twothreads' cyg_user_start() function\n"); <-- triggers ASSERT
etc...
------------------------
Init device '/dev/ttydiag'
Init tty channel: 81200444
Init device '/dev/haldiag'
HAL/diag SERIAL init
ASSERT FAIL: <1>stream.cxx[604]Cyg_ErrNo Cyg_StdioStream::write() Stream object is not a valid stream!
ASSERT FAIL: <1>stream.cxx [ 604] Cyg_ErrNo Cyg_StdioStream::write() Stream object is not a valid stream!
TRACE: <FFFF>mlqueue.cxx [ 89] Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() {{enter
TRACE: <FFFF>mlqueue.cxx [ 110] Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() }}return void
TRACE: <FFFF>except.cxx [ 95] Cyg_Exception_Control::Cyg_Exception_Control() {{enter
TRACE: <FFFF>except.cxx [ 107] Cyg_Exception_Control::Cyg_Exception_Control() }}return void
TRACE: <FFFF>clock.cxx [ 87] Cyg_Counter::Cyg_Counter() {{enter
TRACE: <FFFF>clock.cxx [ 87] Cyg_Counter::Cyg_Counter() }}RETURNING UNSET!
TRACE: <FFFF>clock.cxx [ 432] Cyg_Clock::Cyg_Clock() {{enter
TRACE: <FFFF>clock.cxx [ 432] Cyg_Clock::Cyg_Clock() }}RETURNING UNSET!
TRACE: <FFFF>intr.cxx [ 86] Cyg_Interrupt::Cyg_Interrupt() {{enter
TRACE: <FFFF>intr.cxx [ 86] Cyg_Interrupt::Cyg_Interrupt() ((vector=4, priority=1, data=81205f4c, isr=8101a864, dsr=8101a8a4))
TRACE: <FFFF>intr.cxx [ 109] Cyg_Interrupt::Cyg_Interrupt() }}return void
TRACE: <FFFF>clock.cxx [ 838] Cyg_RealTimeClock::Cyg_RealTimeClock() {{enter
TRACE: <FFFF>intr.cxx [ 395] void Cyg_Interrupt::attach() {{enter
TRACE: <FFFF>intr.cxx [ 456] void Cyg_Interrupt::attach() }}return void
TRACE: <FFFF>intr.cxx [ 659] static void Cyg_Interrupt::unmask_interrupt() {{enter
TRACE: <FFFF>intr.cxx [ 672] static void Cyg_Interrupt::unmask_interrupt() }}return void
TRACE: <FFFF>clock.cxx [ 838] Cyg_RealTimeClock::Cyg_RealTimeClock() }}RETURNING UNSET!
TRACE: <FFFF>mlqueue.cxx [ 578] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() {{enter
TRACE: <FFFF>mlqueue.cxx [ 578] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() ((sched_info=0000001f))
TRACE: <FFFF>mlqueue.cxx [ 592] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() }}return void
TRACE: <FFFF>sched.cxx [ 493] Cyg_SchedThread::Cyg_SchedThread() {{enter
TRACE: <FFFF>sched.cxx [ 493] Cyg_SchedThread::Cyg_SchedThread() }}RETURNING UNSET!
TRACE: <FFFF>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() {{enter
TRACE: <FFFF>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() }}RETURNING UNSET!
TRACE: <FFFF>thread.cxx [ 186] Cyg_Thread::Cyg_Thread() {{enter
TRACE: <FFFF>mlqueue.cxx [ 420] void Cyg_Scheduler_Implementation::register_thread() {{enter
TRACE: <FFFF>mlqueue.cxx [ 420] void Cyg_Scheduler_Implementation::register_thread() ((thread=81205d30))
TRACE: <FFFF>mlqueue.cxx [ 423] void Cyg_Scheduler_Implementation::register_thread() }}return void
TRACE: <FFFF>thread.cxx [ 224] Cyg_Thread::Cyg_Thread() }}return void
TRACE: <FFFF>thread.cxx [1275] Cyg_IdleThread::Cyg_IdleThread() {{enter
TRACE: <1>thread.cxx [ 597] void Cyg_Thread::resume() {{enter
TRACE: <1>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() {{enter
TRACE: <1>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() ((thread=81205d30))
TRACE: <1>mlqueue.cxx [ 263] void Cyg_Scheduler_Implementation::add_thread() }}return void
TRACE: <1>thread.cxx [ 628] void Cyg_Thread::resume() }}return void
TRACE: <1>thread.cxx [1282] Cyg_IdleThread::Cyg_IdleThread() }}return void
TRACE: <1>mlqueue.cxx [ 578] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() {{enter
TRACE: <1>mlqueue.cxx [ 578] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() ((sched_info=0000000a))
TRACE: <1>mlqueue.cxx [ 592] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() }}return void
TRACE: <1>sched.cxx [ 493] Cyg_SchedThread::Cyg_SchedThread() {{enter
TRACE: <1>sched.cxx [ 493] Cyg_SchedThread::Cyg_SchedThread() }}RETURNING UNSET!
TRACE: <1>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() {{enter
TRACE: <1>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() }}RETURNING UNSET!
TRACE: <1>thread.cxx [ 186] Cyg_Thread::Cyg_Thread() {{enter
TRACE: <1>mlqueue.cxx [ 420] void Cyg_Scheduler_Implementation::register_thread() {{enter
TRACE: <1>mlqueue.cxx [ 420] void Cyg_Scheduler_Implementation::register_thread() ((thread=81208408))
TRACE: <1>mlqueue.cxx [ 423] void Cyg_Scheduler_Implementation::register_thread() }}return void
TRACE: <1>thread.cxx [ 224] Cyg_Thread::Cyg_Thread() }}return void
TRACE: <1>cstartup.cxx [ 88] cyg_iso_c_start() {{enter
TRACE: <1>cstartup.cxx [ 88] cyg_iso_c_start() (((void)))
TRACE: <1>cstartup.cxx [ 92] void cyg_iso_c_start() 'Resuming cyg_libc_main_thread'
TRACE: <1>thread.cxx [ 597] void Cyg_Thread::resume() {{enter
TRACE: <1>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() {{enter
TRACE: <1>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() ((thread=81208408))
TRACE: <1>mlqueue.cxx [ 263] void Cyg_Scheduler_Implementation::add_thread() }}return void
TRACE: <1>thread.cxx [ 628] void Cyg_Thread::resume() }}return void
TRACE: <1>cstartup.cxx [ 95] cyg_iso_c_start() }}return void
TRACE: <1>mutex.cxx [ 92] Cyg_Mutex::Cyg_Mutex() {{enter
TRACE: <1>mutex.cxx [ 130] Cyg_Mutex::Cyg_Mutex() }}return void
TRACE: <1>malloc.cxx [ 122] malloc() {{enter
TRACE: <1>malloc.cxx [ 122] malloc() ((size=256 ))
TRACE: <1>mempolt2.inl [ 247] cyg_uint8* Cyg_Mempolt2<T>::try_alloc() {{enter
TRACE: <1>mempolt2.inl [ 395] cyg_bool Cyg_Mempolt2<T>::check_this() {{enter
TRACE: <1>mempolt2.inl [ 395] cyg_bool Cyg_Mempolt2<T>::check_this() }}RETURNING UNSET!
TRACE: <1>mempolt2.inl [ 395] cyg_bool Cyg_Mempolt2<T>::check_this() {{enter
TRACE: <1>mempolt2.inl [ 395] cyg_bool Cyg_Mempolt2<T>::check_this() }}RETURNING UNSET!
TRACE: <1>mempolt2.inl [ 247] cyg_uint8* Cyg_Mempolt2<T>::try_alloc() }}RETURNING UNSET!
TRACE: <1>malloc.cxx [ 147] malloc() }}returning pointer 00000000
TRACE: <1>mutex.cxx [ 92] Cyg_Mutex::Cyg_Mutex() {{enter
TRACE: <1>mutex.cxx [ 130] Cyg_Mutex::Cyg_Mutex() }}return void
TRACE: <1>startup.cxx [ 94] void cyg_start() {{enter
TRACE: <1>startup.cxx [ 94] void cyg_start() (((void)))
TRACE: <1>prestart.cxx [ 75] void cyg_prestart() {{enter
TRACE: <1>prestart.cxx [ 75] void cyg_prestart() (((void)))
TRACE: <1>prestart.cxx [ 78] void cyg_prestart() 'This is the system default cyg_prestart()'
TRACE: <1>prestart.cxx [ 82] void cyg_prestart() }}return void
TRACE: <1>pkgstart.cxx [ 85] void cyg_package_start() {{enter
TRACE: <1>pkgstart.cxx [ 85] void cyg_package_start() (((void)))
TRACE: <1>pkgstart.cxx [ 88] void cyg_package_start() 'This is the system default cyg_package_start()'
TRACE: <1>pkgstart.cxx [ 96] void cyg_package_start() }}return void
Scheduler:
Lock: 1
Current Thread: Idle Thread
Threads:
Idle Thread pri = 31 state = R id = 1
stack base = 81205530 ptr = 81205cc0 size = 00000800
sleep reason NONE wake reason NONE
queue = 00000000 wait info = 00000000
main pri = 10 state = R id = 2
stack base = 81206408 ptr = 81208390 size = 00002000
sleep reason NONE wake reason NONE
queue = 00000000 wait info = 00000000
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss