PRU compilation error

Hello all,
So this is my first question in this group!
I could not get any information on the error I am facing so asking it here -
whenever I am trying to compile the program at blinkInternalLED.pru0.c located at /var/lib/cloud9/PocketBeagle/pru I am getting the error:

 #include <pru_cfg.h>
compilation terminated.

Any help on this?

You didn’t mention how you are compiling. I assume that you just did a gcc blinkInternalLED.pru0.c, which doesn’t work as the erroneous library isn’t linked (normal libraries are stored in /usr/include, but pru_cfg.h is in /usr/lib/ti/pru-software-support-package/include)

Here is how you do it (I don’t have a pocket beagle, but it should be the same):

  1. cd /var/lib/cloud9/PocketBeagle/pru
  2. export TARGET=blinkInternalLED.pru0
  3. make

it should instantly start blinking. You can either change the TARGET to something else and make again or stop the blinking by either rebooting or saying: echo 'stop' > /sys/class/remoteproc/remoteproc1/state