Skip to content

Instantly share code, notes, and snippets.

@alexanderhiam
Last active December 20, 2017 23:40
Show Gist options
  • Save alexanderhiam/2c4187c710b2c409d8dde8c4015fe007 to your computer and use it in GitHub Desktop.
Save alexanderhiam/2c4187c710b2c409d8dde8c4015fe007 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
modprope -r pru_rproc
@giuliomoro
Copy link

last line should be modprobe, not modprope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment