Nios2 problems when building tests

Joel Sherrill joel.sherrill at OARcorp.com
Tue Mar 24 19:45:24 UTC 2009


Roger Dahlkvist wrote:
> Thanks, any help is greatly appreciated.
>
> The status for me right now is that I have switched to newlib-1.17.0.  I also changed both cpukit/wrapup/Makefile.am and c/src/wrapup/Makefile.am, as suggested.
> That fixed most errors, now that both librtemscpu.a and librtemsbsp.a are added correctly.
>   
Then you are probably close to in sync with what I have
on my laptop at home.
> I've tried myself to solve the remaining issues, by including /shared/bsppretaskinghook.c to libbsp.a, and define WorkAreaBase in linkcmds.
> However the resulting tests fail in the simulator, so that might not have been the right way to go, or there are other things to consider aswell.
>
>   

How do the tests fail? 

Usually at this point it is memory layout.

All BSPs now use the same framework for BSP initialization
and most use exactly the same mechanism for dividing memory
between the RTEMS Workspace and C program heap.

Can you get debug IO via printk at this point on the simulator?
If so, make printk work and turn on debugging in libbsp/shared/bootcard.c.

If not, or if it is just as easy, trace through bootcard.c in the debugger
and see if things look ok.

Also (very common), the starting stack (the one the BSP start code
runs on) may NOT be properly accounted for in the linkcmds and
your work memory (workspace and C program heap) may overlap it.
Then the init is clobbering the stack out from underneath you.

_-joel
> Looking forward to your inputs.
>
> //Roger
>
>
> ________________________________________
> Från: millibit at gmail.com [millibit at gmail.com] för Morten Kristiansen [millibit+rtems at gmail.com]
> Skickat: den 24 mars 2009 09:30
> Till: Joel Sherrill
> Kopia: Roger Dahlkvist; rtems-users at rtems.com
> Ämne: Re: Nios2 problems when building tests
>
> 2009/3/20 Joel Sherrill <joel.sherrill at oarcorp.com>:
>   
>> My full NIOS patches are at home.  Morten can help you
>> get things going.
>>     
> I should think so. I'll take a look at it this evening.
>
>   
>> The biggest issue you are facing is that the NIOS II binutils
>> version Altera uses is TOO old for the feature used in cpukit/wrapup.
>>     
> I fetched the relevant versions into Subversion and tried merging. It
> wasn't straightforward, but as a quick solution I can create a patch
> that allows it to read options from a file.
>
> /MK
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list