[ECOS] Assert due to stack problem

Daniel Lidsten Daniel.Lidsten@combitechsystems.com
Tue Nov 19 01:11:00 GMT 2002


Hi,

I got some strange errors when running my system. Since i am debugging then i have the assert enabled and as i understand then everytime CYG_ASSERT checks a thread then it calls the function "Cyg_Thread::check_this". This function returns false and therefor my system hang. After digging out the real error then it seems like i have some stack problem - which i am a bit sceptical about.

The output from assert is the following:
[check_this]System stack pointer BELOW STACKBASE (ptr:95134 < base:1720f0)

The code for printing this are:
Cyg_Thread::check_this( cyg_assert_class_zeal zeal) const
{
.....

 if( stack_ptr < stack_base   )
 {
   diag_printf("\n[%s]System stack pointer BELOW STACKBASE (ptr:%x < base:%x)", __FUNCTION__,stack_ptr , stack_base);
   return false;
 }
.....
}

As you can see, the "check" function makes sure that the stack pointer is within legal values. The legal values are defined as the upper and lower walls for the entire stack. However, when i look for what is located and the memory address where my stack pointer is poniting then i found the follwoing:

 .bss           0x00093500     0x2020 C:\Amersham\cu901\ecos_configuration\CU_ecos_rel29dalids_install\lib/vectors.o
                0x00093500                cyg_interrupt_stack_base
                0x00095500                cyg_interrupt_stack

I think that maybe the assert check that is performed above is not valid and should be removed. Am i missing something here? Why isn't the interrupt stack placed within the region of the rest of the stack?

Regards, Daniel


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



More information about the Ecos-discuss mailing list