Hi,<br><br>No, it's not obvious. You have to declare your own grlib_amba_bus structure:<br><br>struct ambapp_bus grlib_amba_bus =<br>{<br> .mmaps = NULL,<br> .root = NULL<br>};<br><br>You will then use it in grlib_bus_config struct along with your driver resources struct. You can figure this out by looking to the examples and understanding section 2 of:<br>
<br><a href="ftp://gaisler.com/gaisler.com/rcc/doc/rtems-gaisler-drivers-1.1.99.13.0.pdf">ftp://gaisler.com/gaisler.com/rcc/doc/rtems-gaisler-drivers-1.1.99.13.0.pdf</a><br><br><br>Best,<br>JM<br><br><br><div class="gmail_quote">
On Fri, Dec 3, 2010 at 11:12 AM, Matthews, Lee <span dir="ltr"><<a href="mailto:l.matthews@imperial.ac.uk">l.matthews@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal">Hi All,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’m a complete beginner to RTEMs and I’m having
some problems getting some example code to compile correctly, I’d
appreciate a hand if anyone is able.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Essentially I’m developing for an Aeroflex
Gaisler LEON3 processor that is running on a Pender GR-CPCI-AX2000 development
board. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I installed Aeroflex Gaisler‘s debug monitor GRTOOLs
package which also installed a set of rtems example code.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’m developing using Eclipse (v1.3) on top of
which I installed the rtems plugin (v1.4 from <a href="http://www.rtems.com/ftp/pub/rtems/eclipse/updates/" target="_blank">http://www.rtems.com/ftp/pub/rtems/eclipse/updates/</a>)
on a windows XP machine.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I can get some of the simple hello world type examples to
compile ok, then upload and run them on the LEON3 processor without problems.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">However, I’m now trying to get the spacewire example
working (rtems-spwtest-2boards.c) without much luck. When the compiler reaches
the file config_leon3_drvmgr.c (included as an attachment), it produces the
following compilation error : 'ambapp_root' undeclared (first use in this
function) </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The problem seems to come from this bit of code :</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">void system_init2(void)</p>
<p class="MsoNormal">{</p>
<p class="MsoNormal"> /*
LEON3 AMBA PnP bus */</p>
<p class="MsoNormal"> grlib_amba_bus.mmaps
= NULL;</p>
<p class="MsoNormal"> grlib_amba_bus.root
= ambapp_root;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> /*
Register GRLIB root bus */</p>
<p class="MsoNormal"> drv_mgr_grlib_init(&grlib_bus_config);</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">It assigns grlib_amba_bus.root to ambapp_root, but I
can’t seem to find a declaration of the ambapp_root variable anywhere. Am
I missing something glaringly obvious?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks in advance.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Best wishes,</p>
<p class="MsoNormal">Lee Matthews</p>
<p class="MsoNormal"> </p>
</div>
</div>
<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></blockquote></div><br>