Context Switch Problem

Juergen Zeller juergen.zeller at argovision.de
Mon May 15 07:20:28 UTC 2006


some time ago I had similar problems with a custom 386ex board.
I used 4.6.0 and had an exception at the first context switch.
My problem was the fact that the macros __USE_INIT_FINI__ and 
__USE_MAIN__ were defined.
in cpucit/score/src/threadhandler.c in _Thread_Handler () there was a 
function call _init ().
But this call ended due to linkcmds at a point without return.
.init : { _init = .; *(.init) } = 0x9090
hope this helps - check these macros

--juergen

Samuel Bitton schrieb:

>Note that I'm relying mostly on the default RTEMS configuration.
>My application (which is a simple single init task that toggles a line indefinitely) only defines the following before including confdefs.h
>#define CONFIGURE_TERMIOS_DISABLED
>#define CONFIGURE_MAXIMUM_TASKS            2
>#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
>
>Is there anything I'm missing in the RTEMS config or should that be ok in which case my current guess would be a bad memory mapping from my side.
>
>Regards
>Sam
>
> -----Original Message-----
>From: 	Joel Sherrill [mailto:joel.sherrill at oarcorp.com] 
>Sent:	12 May 2006 16:21
>To:	Chris Johns
>Cc:	Samuel Bitton; rtems-users at rtems.com
>Subject:	Re: Context Switch Problem
>
>Chris Johns wrote:
>
>  
>
>>Samuel Bitton wrote:
>>
>>    
>>
>>>Hi
>>>
>>>I'm currently working on a new RTEMS BSP for a custom made board 
>>>based around the i386ex processor.
>>>The software currently breaks towards the end of RTEMS 
>>>initialisation, at the point where it is doing the first context 
>>>switch (_Context_Switch called at the end of 
>>>_Thread_Start_multitasking).
>>>
>>>My application only has one small init task which toggles a line 
>>>indefinitely.
>>>Any idea what could be going wrong.
>>>I'm using RTEMS 4.6.4.
>>>
>>>      
>>>
>>Have you look over this page:
>>
>> http://www.rtems.org/wiki/index.php/DebuggingHints
>>
>>It has some reasons a BSP can fail.
>>
>>    
>>
>And the most likely reason is included there -- an interrupt is pending 
>and you are taking
>an exception.  The first context switch enables CPU interrupts and any 
>device not in a
>quiescent state will slap you here. :)
>
>--joel
>
>  
>
>>Regards
>>Chris
>>    
>>
>
>
>
>
>
>  
>



More information about the users mailing list