PRU example does not work

Hello everybody,

I just got my hands on a BB AI. During my testing I stumbled over an error in the Cloud 9 examples.I wanted to run the program blinkInternalLED.pru1_1.c of the PRU examples of the AI.

The following message appeares in the terminal output if I try to run it (note: I work with the cloud 9 IDE):

fatal error: pru_cfg.h: No such file or directory
#include <pru_cfg.h>

I updated the BB to the latest version. Did I miss something else to be able to run the example files? Or is the header for the pru realy missing?

Thanks alot
Stephan

Could you refer to which version of the image or code repository this applies?

I have a BBBlack.
Maybe I could try it.

Sry, I totally forgot about this one.

I just came back to playing around with the cloud9 examples. The pru examples work, if you take the right runner (which is C or C++ Beagle Makefile).

In the meantime, I did a few things to my BB AI, e.g. I patched the kernel to 4.14.108-ti-xenomai-r127. Now, everytime a halt() occurs in the code, I get an error:

  • Stopping PRU 1_1
    sh: echo: I/O error
    Cannot stop 1_1
    CC blinkExternalLED.pru1_1.c

Just tested this with the non xenomai kernel (4.14.108-ti-r127) and it doesn’t work either.
But, the installation with the newest image (Debian 9.9 lxqt, kernel 4.14.108-ti-r124), afterwards apt-get update/upgrade aswell as a git pull in the cloud9 directory works fine.

I did not make any changes to something pru related. Anyone else with the r127 release facing this?

Stephan

I did some further investigations.

It’s not a problem of the examples, I guess. If I directly address the PRUs via the linux system with

echo 'start' > /sys/class/remoteproc/remoteprocX/state

I get a write error: Invalid argument.
My COM connections says

remoteproc remoteprocX: Boot failed: -22

for such an event.

This occurs for all PRU cores except remoteproc1 (PRU1_1). If I start this one, the mentioned blink example starts.

I checked the present firmware and uevent entrys for every single core and they seem to be fine.

Has anyone a clue what may block the PRUs right from a restart?

Thanks
Stephan