Sunday, October 19, 2014

3.14 Beaglebone and PRU

Spent the weekend getting 3.14.19 and builtroot up and running.  For the past month I've been using 3.17 version from kernel.org.  But this version did not support uio or remoteproc without some patches.  The beaglebone Debian is moving to using the kernel from TI 3.14.19, this kernel has patches for remoteproc support for PRU.

So, what does remoteproc support do?

  • The kernel will auto load PRU0 and PRU1 if there are images in the /lib/firmware directory.  Here is a snippet from kernel boot:

[    4.141922]  remoteproc0: wkup_m3 is available
[    4.146591]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[    4.156581]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    4.171128] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores
[    4.179184]  remoteproc0: powering up wkup_m3
[    4.183806]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 154768
[    4.196764]  remoteproc1: 4a334000.pru0 is available
[    4.202978]  remoteproc0: remote processor wkup_m3 is now up
[    4.209029]  remoteproc1: Note: remoteproc is still under development and considered experimental.
[    4.218660]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    4.230579]  remoteproc1: failed to load rproc-pru0-fw
[    4.236211] pru-rproc 4a334000.pru0: booting the PRU core manually
[    4.242935]  remoteproc1: powering up 4a334000.pru0
[    4.248576]  remoteproc1: request_firmware failed: -2
[    4.253862] pru-rproc 4a334000.pru0: rproc_boot failed
[    4.259804] pru-rproc: probe of 4a334000.pru0 failed with error -2
[    4.267368]  remoteproc2: 4a338000.pru1 is available
[    4.272810]  remoteproc2: Note: remoteproc is still under development and considered experimental.
[    4.282292]  remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    4.293770]  remoteproc2: failed to load rproc-pru1-fw
[    4.299574] pru-rproc 4a338000.pru1: booting the PRU core manually
[    4.306039]  remoteproc2: powering up 4a338000.pru1
[    4.311536]  remoteproc2: request_firmware failed: -2
[    4.316818] pru-rproc 4a338000.pru1: rproc_boot failed
[    4.322460] pru-rproc: probe of 4a338000.pru1 failed with error -2

The kernel attempts to load rptoc-pru0-fw and rproc-pru1-fw.  At this time, there is no files, so it fails to load.

One other important issue, is, capemgr is not supported.  There is a nice project at github I'm going to start to use the the config-pin to setup digital lines for LEDs and interrupt from BMP180.  


  • using uio the firmware needs to be in tow parts, data and binary.  Now, using remoteproc, it can be in the elf file format. 
  • There are a couple of projects that use PRU remoteproc to DMA messages between the A8 and PRU.  

For this project, it will be a simple shared memory access from userspace to PRU memory to read a list of PWM decode values.

I'm using the github 3.14 branch and using the defconfig bb.org_defconfig.

The plan over the next few blogs to to get a simple PWM decode app connection to a hobbyking receiver. 

Here is a quick diagram.   



No comments:

Post a Comment