Skip to content

Instantly share code, notes, and snippets.

@sa1d
Forked from alexanderhiam/beaglebone-4.4-pru-rproc.sh
Created November 23, 2016 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sa1d/aef166ebb301506c980b18a7de8c2341 to your computer and use it in GitHub Desktop.
Save sa1d/aef166ebb301506c980b18a7de8c2341 to your computer and use it in GitHub Desktop.
Using pru_rproc on the BeagleBone with Linux 4.4
# Good info on the current PRU remoteproc drivers here:
# http://processors.wiki.ti.com/index.php/PRU-ICSS_Remoteproc_and_RPMsg
# I mostly just followed this guide:
# https://groups.google.com/d/msg/beagleboard/od6h9yTKUD4/jzGE6KaxAQAJ
# On the BeagleBone with a 4.4 kernel:
# root@beaglebone:~# uname -r
# 4.4.11+
# First some setup required for the TI PRU support package makefiles:
mkdir /usr/share/ti/cgt-pru/bin
cd /usr/share/ti/cgt-pru/bin
ln -s /usr/bin/clpru clpru
echo -e "\nexport PRU_CGT=/usr/share/ti/cgt-pru\n" >> ~/.bashrc
. ~/.bashrc
# Now clone the TI PRU support package:
cd
git clone git://git.ti.com/pru-software-support-package/pru-software-support-package.git
# Build an example:
cd pru-software-support-package/examples/am335x/PRU_RPMsg_Echo_Interrupt0
make
cp gen/PRU_RPMsg_Echo_Interrupt0.out /lib/firmware/am335x-pru0-fw
# Load pru_rproc driver, which attempts to load /lib/firmware/am335x-pru0-fw
# to PRU 0 and /lib/firmware/am335x-pru1-fw to PRU 1:
modprobe pru_rproc
# Try it out:
echo "Hello, World!" > /dev/rpmsg_pru30 && cat /dev/rpmsg_pru30
# You should see "Hello, World!" echoed back from the PRU
# To unload:
# root@beaglebone:~# lsmod | grep pru
# pruss_intc 3592 0
# pru_rproc 11457 0
# pruss 11912 1 pru_rproc
modprobe -r pru_rproc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment