Recomended practices for using the PRUs

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.

Hi!
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

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).

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

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