PRU Cape not working

Hi,

I’m having trouble getting my BBB to run PRU Cape demos.

This is what I did:

  1. cd /opt/source/dtb-4.4-ti && git pull
  2. Add #include “am335x-boneblack-prucape.dtsi” to am335x-boneblack-wireless.dts
  3. make clean && make && sudo make install

This should put my device blob in /boot/dtbs/4.4.30-ti-r64, which it does

  1. cd /opt/source/pru-software-support-package/ && git pull
  2. cd /opt/source/pru-software-support-package/pru_cape/bin/Linux
  3. sudo ./pru_demo.sh
  4. Select LEDs

I get an error:

./pru_demo.sh: line 67: echo: write error: No such device
./pru_demo.sh: line 68: echo: write error: No such device

Those lines:

67 echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/bind 68 echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/bind

What should I do here to get these demos to work? Where does the 4a334000.pru0 come from? How can I find my PRU IDs?

Thanks,

Upon further investigation, I see this output from dmesg:

`
[ 2.381018] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148

`

Why is remoteproc looking for a .elf file? How can I update this?

In the am335x-boneblack-wireless.dts there is a comment:

`
17 /* pruss: pick one: /
18
19 /

20 * /etc/modprobe.d/pruss-blacklist.conf
21 *
22 * blacklist uio_pruss
23 /
24
25 /
#include “am33xx-pruss-rproc.dtsi” /
26
27 /

28 * /etc/modprobe.d/pruss-blacklist.conf
29 *
30 * blacklist pruss
31 * blacklist pruss_intc
32 * blacklist pru-rproc
33 */

`

``
I uncommented line 25, and added uio_pruss to the modules blacklist, and everything works as expected. It’s loading the two .out files symlinked in /lib/firmware. The modules fail to load when I added them in /etc/modules, but will load once the system is booted and I modprobe -r pru_rproc && modprobe pru_rproc them. So I added those commands to /etc/rc.local. It’s probably not the preferred way to load modules, but it works here.

On a personal note, I spent far too much time sifting through tons of obsolete instructions on loading the PRUs with firmware all over the internet. If you ask the Sitara experts on the TI forums, they won’t support you (much) unless you’re using their SDK, and if it weren’t for the instructions on the TI site, this would be an almost impossible endeavour. Why aren’t modern instructions provided on the BB site? Modern here meaning using the tools already loaded on the BBB(W) in /opt/sources, and CCS to write and compile C.

Because there are two competing pru implementations..

Those that used 3.8.13 and want a newer kernel

and those that want the new interface..

btw if you run:

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --ti-channel --lts-4_4

you'll get 4.4.52-ti-r91 which has ti's remoteproc_pruss enabled by
default again.*

Regards,