<div dir="ltr">Hi all,<div><br></div><div>I've made a bit of progress tracking down the problem. I wrote an implementation for printk and managed to isolate the issue.</div><div><br></div><div>It is dying in the following funciton in cpu.c:</div>
<div><br></div><div><div>void _CPU_Install_interrupt_stack( void )</div><div>{</div><div>#if ( M68K_HAS_SEPARATE_STACKS == 1 )</div><div>  void *isp = _CPU_Interrupt_stack_high;</div><div><br></div><div>  asm volatile ( "movec %0,%%isp" : "=r" (isp) : "0" (isp) );</div>
<div>#endif</div><div>}</div></div><div><br></div><div>Looking in m68k.h, M68K_HAS_SEPARATE_STACKS should be false for a mcpu32 target. What am I missing?  </div><div><br></div><div>Is it something to do with RTEMS_CPU or RTEMS_CPU_FAMILY not being set correctly? </div>
<div><br></div><div>My RTEMS version is 4.10.2 and I'm using eclipse with the RTEMS plugin.</div><div><br></div><div>Feels like I'm close now, appreciate any pointers on these last details.</div><div><br></div><div>
Cheers,</div><div>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 March 2014 07:41, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 3/6/2014 11:19 AM, Gedare Bloom wrote:<br>
> On Thu, Mar 6, 2014 at 5:37 AM, James Fitzsimons<br>
> <<a href="mailto:james.fitzsimons@gmail.com">james.fitzsimons@gmail.com</a>> wrote:<br>
>> Hi all,<br>
>><br>
>> I'm trying to get an old bsp working - the mrm332 bsp for a 68332 target. I<br>
>> know it's old technology but I have one of these boards and it will be a<br>
>> good fit for a project I want to do.<br>
>><br>
>> Unfortunately I don't think the mrm332 bsp can every have been in a working<br>
>> state, or at least it isn't anymore.<br>
>><br>
> What version of RTEMS is this BSP on?<br>
><br>
>> I managed to get it kind of working by using the RAM linker script which<br>
>> just dumps everything into RAM, of course you can only run your program once<br>
>> and then you have to reload because the .data section gets hosed.<br>
>><br>
>> I think I'm close to a linker script to run out of ROM, but it seems to be<br>
>> failing when it gets to bsp_get_work_area in bootcard.c. All I end up with<br>
>> is garbage at the console. I've verified it works up to here by switching on<br>
>> one of the onboard LED's just prior to the call to bsp_get_work_area. I've<br>
>> also examined the memory (flash and RAM) and it all looks pretty good.<br>
>> Moving the LED code to just after the call to bsp_get_work_area doesn't<br>
>> work.<br>
>><br>
> The most likely case is that the work area is overlapping with other<br>
> memory sections in your linker script. The work area and program heap<br>
> need to be well-defined regions that do not overlap with anything<br>
> else, otherwise the initialization of those heaps will wipe out<br>
> whatever memory they overlap.<br>
><br>
>> I've gone over my linker script a dozen times. Anyone have any suggestions<br>
>> as to how to debug this problem?<br>
>><br>
> Try to find the bounds on the program heap and the work space. See<br>
> what the start/end addresses are and whether they are overlapping with<br>
> anything else in memory.<br>
</div></div>If on the head, this is a likely candidate. AFAIK this BSP has not been<br>
tested since<br>
we moved to the common code for initializing memory. A simple bug in memory<br>
layout during the adjustment would do this.<br>
<div class="HOEnZb"><div class="h5">> Good luck,<br>
> Gedare<br>
><br>
>> Many thanks!<br>
>> James Fitzsimons<br>
>><br>
>> _______________________________________________<br>
>> rtems-users mailing list<br>
>> <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
>> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
>><br>
> _______________________________________________<br>
> rtems-users mailing list<br>
> <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Joel Sherrill, Ph.D.             Director of Research & Development<br>
joel.sherrill@OARcorp.com        On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS  Huntsville AL 35805<br>
Support Available                (256) 722-9985<br>
<br>
</font></span></blockquote></div><br></div>