PRU0 to ARM interrupt - RPMSG


I am attempting to implement interrupt-driven communication between the ARM and PRU on my BeagleBone Black using the RPMsg protocol. Following the documentation provided by TI, I tried executing the example code located at
/usr/lib/ti/pru-software-support-package-v6.0/examples/am335x/PRU_RPMsg_Echo_Interrupt0 However, After setting environment variable PRU_CGT and creating link file ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin .I encountered the following error:

debian@BeagleBone:/usr/lib/ti/pru-software-support-package-v6.0/examples/am335x/PRU_RPMsg_Echo_Interrupt0$ sudo make
Makefile:23: *** 
PRU_CGT environment variable is not set. For example:
(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.3.3
(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.3.3
(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru

*ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in
order to use the same Makefile
(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin

The latest PRU CGT can be found at or in Code
Composer Studio (CCS) App Center.
.  Stop.
debian@BeagleBone:/$ printenv PRU_CGT
debian@BeagleBone:/$ sudo ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin
ln: failed to create symbolic link '/usr/share/ti/cgt-pru/bin/bin': File exists

Also, I could not find rpmsg_pru0 and rpmsg_pru1 device files in the /dev/ dir. How to resolve this issue.


debian@BeagleBone:/$ uname -a
Linux BeagleBone 5.10.168-ti-r71 #1bullseye SMP PREEMPT Fri Sep 1 04:05:07 UTC 2023 armv7l GNU/Linux



sudo does not inherit the environment by default, so PRU_CGT would not be propagated. Try this instead:

sudo -E make


1 Like

Hi dimitar,

I’ll try and let you know.


You don’t need sudo to build a code. Just execute make from your debian user.

Hello Dimitar,

Executing sudo -E make was successful, and the “gen” directory has been generated. With progress made on the PRU side, I now have the output file ready to be copied to /lib/firmware and loaded into /sys/class/remoteproc/remoteproc0/firmware. However, I’ve encountered an issue: there are no device files in /dev/ to establish rpmsg.

debian@BeagleBone:/home/nanatom/pru/ti/PRU_RPMsg_Echo_Interrupt0/gen$ ls -l
total 152
-rw-r–r-- 1 root root 57272 Apr 8 13:46 main.object
-rw-r–r-- 1 root root 881 Apr 8 13:46 main.pp
-rw-r–r-- 1 root root 15619 Apr 8 13:46
-rw-r–r-- 1 root root 75660 Apr 8 13:46 PRU_RPMsg_Echo_Interrupt0.out

Hello ,

That didn’t work .

The rpmsg_pru30 device file in the /dev directory is generated through the following steps:

  1. Copy the PRU_RPMsg_Echo_Interrupt0.out file to /lib/firmware/am335x-pru0-fw .

$ cp PRU_RPMsg_Echo_Interrupt0.out /lib/firmware/am335x-pru0-fw

  1. Load the firmware.

$ echo am335x-pru0-fw > /sys/class/remoteproc/remoteproc1/firmware

  1. Start PRU0.

$ echo start > /sys/class/remoteproc/remoteproc1/state

Following these steps will create the device file, enabling message exchange between ARM and PRU.

1 Like