Hello, I'm trying to bring up eCos on an ARM9 board, the starting point I have is a port for Redboot but I would like to use the full feature set of eCos. I have put together a configuration which I can program to the board and have basic I/O over serial. The main entry point for my code 'cyg_start' runs as expected but the thread I create does not start. I enabled debug trace and the first assert I get is "ASSERT FAIL: <2>mlqueue.cxx[265]void Cyg_Scheduler_Implementation::add_thread() Idle thread vanished!!!"
Can anyone tell me why I would get the ASSERT above? thanks, Brendan. ========= code =========== void cyg_start(void) { unsigned cyg_start_count = 0; diag_printf("Hello from cyg_start: #%u\n", cyg_start_count++); cyg_thread_create(1, testthd_main, (cyg_addrword_t) 0, "testthd", (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]); cyg_thread_resume(thread[0]); for(;;) { cyg_thread_delay (100); } } static void testthd_main (CYG_ADDRESS data) { unsigned int Count = 0; for (;;) { diag_printf ("testthd_main:: %10u\n", Count++); cyg_thread_delay (100); } } ========= code =========== ===== serial output ====== Hello from cyg_start: #0 ASSERT FAIL: <2>mlqueue.cxx[265]void Cyg_Scheduler_Implementation::add_thread() Idle thread vanished!!! ASSERT FAIL: <2>mlqueue.cxx [ 265] void Cyg_Scheduler_Implementation::add_thread() Idle thread vanished!!! TRACE: <2>clock.cxx [ 87] Cyg_Counter::Cyg_Counter() {{enter TRACE: <2>clock.cxx [ 87] Cyg_Counter::Cyg_Counter() }}RETURNING UNSET! TRACE: <2>clock.cxx [ 432] Cyg_Clock::Cyg_Clock() {{enter TRACE: <2>clock.cxx [ 432] Cyg_Clock::Cyg_Clock() }}RETURNING UNSET! TRACE: <2>intr.cxx [ 86] Cyg_Interrupt::Cyg_Interrupt() {{enter TRACE: <2>intr.cxx [ 86] Cyg_Interrupt::Cyg_Interrupt() ((vector=26, priority=1, data=0000eb90, isr=83f0b81c, dsr=83f0c488)) TRACE: <2>intr.cxx [ 109] Cyg_Interrupt::Cyg_Interrupt() }}return void TRACE: <2>clock.cxx [ 838] Cyg_RealTimeClock::Cyg_RealTimeClock() {{enter TRACE: <2>intr.cxx [ 452] void Cyg_Interrupt::attach() {{enter TRACE: <2>intr.cxx [ 513] void Cyg_Interrupt::attach() }}return void TRACE: <2>intr.cxx [ 716] static void Cyg_Interrupt::unmask_interrupt() {{enter TRACE: <2>intr.cxx [ 729] static void Cyg_Interrupt::unmask_interrupt() }}return void TRACE: <2>clock.cxx [ 838] Cyg_RealTimeClock::Cyg_RealTimeClock() }}RETURNING UNSET! TRACE: <2>except.cxx [ 95] Cyg_Exception_Control::Cyg_Exception_Control() {{enter TRACE: <2>except.cxx [ 107] Cyg_Exception_Control::Cyg_Exception_Control() }}return void TRACE: <2>mlqueue.cxx [ 89] Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() {{enter TRACE: <2>mlqueue.cxx [ 110] Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() }}return void TRACE: <2>mlqueue.cxx [ 583] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() {{enter TRACE: <2>mlqueue.cxx [ 583] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() ((sched_info=00000001)) TRACE: <2>mlqueue.cxx [ 597] Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() }}return void TRACE: <2>sched.cxx [ 487] Cyg_SchedThread::Cyg_SchedThread() {{enter TRACE: <2>sched.cxx [ 487] Cyg_SchedThread::Cyg_SchedThread() }}RETURNING UNSET! TRACE: <2>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() {{enter TRACE: <2>clock.cxx [ 647] Cyg_Alarm::Cyg_Alarm() }}RETURNING UNSET! TRACE: <2>thread.cxx [ 186] Cyg_Thread::Cyg_Thread() {{enter TRACE: <2>mlqueue.cxx [ 425] void Cyg_Scheduler_Implementation::register_thread() {{enter TRACE: <2>mlqueue.cxx [ 425] void Cyg_Scheduler_Implementation::register_thread() ((thread=0000af10)) TRACE: <2>mlqueue.cxx [ 428] void Cyg_Scheduler_Implementation::register_thread() }}return void TRACE: <2>thread.cxx [ 224] Cyg_Thread::Cyg_Thread() }}return void TRACE: <2>thread.cxx [ 597] void Cyg_Thread::resume() {{enter TRACE: <2>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() {{enter TRACE: <2>mlqueue.cxx [ 202] void Cyg_Scheduler_Implementation::add_thread() ((thread=0000af10)) Scheduler: Lock: 2 Current Thread: Idle Thread Threads: main pri = 10 state = U id = 1 stack base = 0000cae0 ptr = 0000ea70 size = 00002000 sleep reason NONE wake reason NONE queue = 00000000 wait info = 00000000 Idle Thread pri = 31 state = R id = 2 stack base = 0000c190 ptr = 0000c920 size = 00000800 sleep reason NONE wake reason NONE queue = 00000000 wait info = 00000000 testthd pri = 1 state = R id = 3 stack base = 000095a8 ptr = 0000ae90 size = 00001960 sleep reason NONE wake reason NONE queue = 00000000 wait info = 00000000 ===== serial output ======