ERC32 BSP (a bit further this time)

Neil Mayes N.Mayes at sstl.co.uk
Tue May 6 15:14:09 UTC 2008


Hi Joel,
 
> Neil Mayes wrote:
> > Hi Philip,
> >
> >   
> >> A.  How do you know you are not returning from 
> >> rtems_initialize_executive_early()?
> >>     
> > I have a GPIO driving an LED and on return from boot_card I 
> am setting 
> > the LED high. I added early returns from boot_card and can 
> see I never 
> > return from rtems_initialize_executive_early. Now I can see I never 
> > return from _CPU_Initialize. If the LED does not light I have not 
> > returned.
> >   
> Sounds very much like RTEMS has encountered a fatal error in 
> your configuration.  Break at _Internal_Error_occurred.
It's a little worse than that. The 1st failure occurs in
_CPU_Context_save_fp. The FP NULL context address is passed using local
variable Context_Control_fp *pointer; which appears to be placed on the
stack, I get address 0x021F2094 and this should contain
&_CPU_Null_fp_context. In the _CPU_Context_save_fp() the address has
been changed to 0x01000000 which causes a trap. I am starting to think
there must be some setup missing from the BSP, it's like the workspace
memory is not correctly configured. I have not deviated from the BSP but
I'm starting to think there must be things missing! If I change the code
and pass the global address, this works fine but then falls over with
another memory trap when _User_extensions_Handler_initialization() tries
to allocate from the workspace memory. Could it be the tools I have
built? I really am stuck and confused with this :(

> 
> Another common error is that there is an interrupt source 
> that is not cleared or properly initialized and on the first 
> context switch, it is faulting.
> 
> You will not return from boot_card to the assembly until the 
> application exits.
I know I won't return from boot_card until then but first I would like
to get RTEMS to run/work. I am returning early just so I can debug this
at the moment.

Thanks,
Neil




More information about the users mailing list