<div dir="ltr">Thanks for your help.<div>I will go with the bitbucket libraries and will start to rewrite the <a href="https://github.com/freebsd/freebsd/blob/250e158ddf52459661439141407bca505d199c19/sys/arm/ti/ti_pruss.c">bsd</a> driver for rtems.</div><div><br></div><div>Have you also seen the pructrl bitbucket repo?</div><div><a href="https://bitbucket.org/rpaulo/pructl/src/default/">https://bitbucket.org/rpaulo/pructl/src/default/</a><br></div><div>It is an interface for the drivers and I think this can be easily rewritten into some rtems shell commands.</div><div><br></div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 14 Jul 2019 at 01:35, Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 13, 2019 at 1:42 PM Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 13/7/19 5:16 pm, Nils Hölscher wrote:<br>
> Hi,<br>
> <br>
> After I made sure that my fdt is correct I wondered why the pruss was still not<br>
> accessible.<br>
> When I researched more about userspace drivers in Linux I found out, that I have<br>
> overseen the pru UIO module in Linux.<br>
> This is the part that links the PRUs to the /dev/uio[0-7].<br>
> Which then would be used by the sources I currently use.<br>
> The UIO source is available here:<br>
> <a href="https://github.com/beagleboard/linux/blob/3.8/drivers/uio/uio_pruss.c" rel="noreferrer" target="_blank">https://github.com/beagleboard/linux/blob/3.8/drivers/uio/uio_pruss.c</a><br>
> However this requires the linux UIO lib to load the modules and abstract the<br>
> device into a file.<br>
> <br>
> While researching I also found that BSD has a PRU driver.<br>
> Also this driver is more feature rich as it support PRU debugging.<br>
> The sources can be found her:<br>
> <a href="https://bitbucket.org/rpaulo/libpru/src/default/" rel="noreferrer" target="_blank">https://bitbucket.org/rpaulo/libpru/src/default/</a><br>
> Additionally I found these sources in the FreeBSD tree:<br>
> <a href="https://github.com/freebsd/freebsd/blob/250e158ddf52459661439141407bca505d199c19/sys/arm/ti/ti_pruss.c" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd/blob/250e158ddf52459661439141407bca505d199c19/sys/arm/ti/ti_pruss.c</a><br>
> This code also registers the PRUs in /dev/.<br>
> On the other hand the BSD drivers have no documentation at all.<br>
> <br>
> These are the code lines that will fail without a file in /dev.<br>
> Linux: <a href="https://github.com/nilhoel1/rtems-pru/blob/master/ti/prussdrv.c#L265" rel="noreferrer" target="_blank">https://github.com/nilhoel1/rtems-pru/blob/master/ti/prussdrv.c#L265</a><br>
> BSD: <a href="https://bitbucket.org/rpaulo/libpru/src/5cb7271533a96d177e73492f7cc40fa4b28396a5/ti-pru.c#lines-614" rel="noreferrer" target="_blank">https://bitbucket.org/rpaulo/libpru/src/5cb7271533a96d177e73492f7cc40fa4b28396a5/ti-pru.c#lines-614</a><br>
> <br>
> So my questions are:<br>
> 1. How are drivers registered to /dev in RTEMS? (examples)<br>
<br>
I suggest you look at cpukit/include/rtems/io.h and then for examples of this<br>
interface being used in the bsp directory.<br></blockquote><div><br></div><div>There is a helper in the IO Manager which is implemented as a call to mknod() </div><div>which is a standard call.  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> 2. Which driver would be a better starting point to bring pruss support to RTEMS?<br></blockquote><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The bitbucket set of drivers look pretty good so I think just use them and add<br>
to the beagle bsp.<br></blockquote><div><br></div><div>+1 If needed, </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Chris<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>
</blockquote></div>