Recomended practices for using the PRUs

47 views
Skip to first unread message

Robert Heller

unread,
Mar 16, 2021, 2:22:24 PM3/16/21
to Beagle Board, Robert Heller
I am working on a program that uses the PRUs in a Beagle Board (AM335X based),
and and trying to figure out if I should be using the Remote Proc method or
UIO method and also which kernel I should be using (4.19.94-ti-r42 or
5.4.102-bone45).

I have looked at this page: https://elinux.org/Ti_AM33XX_PRUSSv2, but I am not
sure if it is not outdated. (It has some broken links.)

I am not sure if I should be using the uio_pruss userspace driver or using the
remoteproc driver.


--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

pierric...@gadz.org

unread,
Mar 16, 2021, 2:28:16 PM3/16/21
to BeagleBoard
Hi! 
From my experience on the PRU,  using Remoteproc is the most recent way to do things and UIO is an older technics. I believe there is some rpmsg examples under /var/lib/cloud9/ in the BB images. 
However, depending on your application you can have a look at Libpruio which does most of the work for you.
The links are broken on the page bc Texas Instrument archived their wiki some time ago. 
Hope it helps,

Pierrick 

Robert Heller

unread,
Mar 16, 2021, 5:11:23 PM3/16/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Tue, 16 Mar 2021 11:28:16 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> Hi!
> >From my experience on the PRU, using Remoteproc is the most recent way to
> do things and UIO is an older technics. I believe there is some rpmsg
> examples under /var/lib/cloud9/ in the BB images.
> However, depending on your application you can have a look at Libpruio
> which does most of the work for you.
> The links are broken on the page bc Texas Instrument archived their wiki
> some time ago.
> Hope it helps,

I'm guessing I need to run with the 4.19.94-ti-r42 kernel?

And what is the proper way to build or install Libpruio? The instructions at
https://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPreparation.html
don't work (the gpg signature is broken) and I am unable to build from source
because it can't find the FreeBASIC compiler (where do I install that from?).

It looks like I am going to have to download the .deb files manually and
install them with dpkg (and I don't know if that will work).

>
> Pierrick
>
> Le mardi 16 mars 2021 à 14:22:24 UTC-4, hel...@deepsoft.com a écrit :
>
> > I am working on a program that uses the PRUs in a Beagle Board (AM335X
> > based),
> > and and trying to figure out if I should be using the Remote Proc method
> > or
> > UIO method and also which kernel I should be using (4.19.94-ti-r42 or
> > 5.4.102-bone45).
> >
> > I have looked at this page: https://elinux.org/Ti_AM33XX_PRUSSv2, but I
> > am not
> > sure if it is not outdated. (It has some broken links.)
> >
> > I am not sure if I should be using the uio_pruss userspace driver or using
> > the
> > remoteproc driver.
> >
> >
> > --
> > Robert Heller -- Cell: 413-658-7953 <(413)%20658-7953> GV: 978-633-5364
> > <(978)%20633-5364>

pierric...@gadz.org

unread,
Mar 16, 2021, 5:55:46 PM3/16/21
to BeagleBoard
Hi, 
I have just tried on 4.19.94-ti-r42; I was able to do the update by doing :
nano /etc/apt/sources.list
and add the lines: 
deb [trusted=yes] http://beagle.tuks.nl/debian jessie/ 
deb-src [trusted=yes] http://beagle.tuks.nl/debian jessie/
Note the addition of  [trusted=yes] compared to what's on the free basic's tutorial.
This should do the trick, and I hope it helps! 
Pierrick

TJF

unread,
Mar 17, 2021, 12:02:56 PM3/17/21
to BeagleBoard
libpruio checks for claimed pins in sysfs file

/sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

This path changed in kernel 4.19 to

/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pinmux-pins

so that pinmuxing fails.

You can fix it by creating a link named as the old path pointing to the new path (admin privilegues).

PS:
Regarding FreeBASIC just execute

sudo apt install freebasic

Reply all
Reply to author
Forward
0 new messages