I just picked up a beaglebone black for a new project. I’d like to use the PRU’s and as such tried to get
“Hello World” from this link http://theduchy.ualr.edu/?p=996 working. The programs all compile but I can’t get them
to run. The major hint I have is looking at /sys/class/remoteproc/ shows me only remoteproc0.
PRU 0 & 1 ‘don’t exist’. I’ve not modified anything in the boot sequence yet. I’ve looked at https://groups.google.com/forum/#!category-topic/beagleboard/pru/4P9NdglojBo
which lead me to trying
echo “4a334000.pru0” > /sys/bus/platform/drivers/pru-rproc/unbind
However, this simply gave me permission denied, despite the fact I was root.
Bill:
Which kernel are you running? (uname -a) I discovered yesterday that the PRUs didn’t work for my students running 4.9, but those running the newer 4.14 had no trouble.
Thanks for your reply. uname -a reveals
Linux beaglebone 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 armv7l GNU/Linux
I haven’t been able to read your whole book yet(looks great btw) but stumbled on the Makefile which contains
stop and start commands. The devices shown in the Makefile (and I did the git-clone to make sure the code was the same as
the book), did not exist. That is an ls -l of /sys/devices/platform/ocp/ doesn’t show any address at 4a3*
wbitner@beaglebone:~$ ls -l /sys/devices/platform/ocp/
total 0
drwxr-xr-x 3 root root 0 Oct 19 20:13 40300000.ocmcram
drwxrwxr-x 5 root gpio 0 Jan 1 2000 44e07000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e09000.serial
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e0b000.i2c
drwxr-xr-x 5 root root 0 Oct 19 20:13 44e35000.wdt
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e3e000.rtc
drwxr-xr-x 9 root root 0 Oct 19 20:13 47400000.usb
drwxr-xr-x 3 root root 0 Oct 19 20:13 48038000.mcasp
drwxr-xr-x 3 root root 0 Oct 19 20:13 48042000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48044000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48046000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48048000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 4804a000.timer
drwxrwxr-x 5 root gpio 0 Jan 1 2000 4804c000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 48060000.mmc
drwxr-xr-x 4 root root 0 Oct 19 20:13 480c8000.mailbox
drwxr-xr-x 3 root root 0 Oct 19 20:13 480ca000.spinlock
drwxr-xr-x 4 root root 0 Oct 19 20:13 4819c000.i2c
drwxrwxr-x 5 root gpio 0 Jan 1 2000 481ac000.gpio
drwxrwxr-x 5 root gpio 0 Jan 1 2000 481ae000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 481d8000.mmc
drwxr-xr-x 4 root root 0 Oct 19 20:13 4830e000.lcdc
drwxr-xr-x 3 root root 0 Oct 19 20:13 48310000.rng
drwxr-xr-x 4 root root 0 Oct 19 20:13 49000000.edma
drwxr-xr-x 3 root root 0 Oct 19 20:13 49800000.tptc
drwxr-xr-x 3 root root 0 Oct 19 20:13 49900000.tptc
drwxr-xr-x 3 root root 0 Oct 19 20:13 49a00000.tptc
drwxr-xr-x 7 root root 0 Oct 19 20:13 4a100000.ethernet
drwxr-xr-x 3 root root 0 Oct 19 20:13 4c000000.emif
drwxr-xr-x 3 root root 0 Oct 19 20:13 53100000.sham
drwxr-xr-x 3 root root 0 Oct 19 20:13 53500000.aes
drwxr-xr-x 3 root root 0 Oct 19 20:13 56000000.sgx
-rw-r–r-- 1 root root 4096 Oct 19 20:13 driver_override
-r–r--r-- 1 root root 4096 Oct 19 20:13 modalias
drwxr-xr-x 3 root root 0 Oct 19 20:13 ocp:cape-universal
drwxr-xr-x 6 root root 0 Oct 19 20:13 ocp:l4_wkup@44c00000
drwxrwxr-x 3 root gpio 0 Jan 1 2000 ocp:P9_19_pinmux
drwxrwxr-x 3 root gpio 0 Jan 1 2000 ocp:P9_20_pinmux
lrwxrwxrwx 1 root root 0 Oct 19 20:13 of_node → …/…/…/firmware/devicetree/base/ocp
drwxr-xr-x 2 root root 0 Oct 19 20:13 power
lrwxrwxrwx 1 root root 0 Oct 19 20:13 subsystem → …/…/…/bus/platform
-rw-r–r-- 1 root root 4096 Oct 19 20:13 uevent
wbitner@beaglebone:~$
Do I need to do anything to make the PRU’s appear?
A more interesting question may be what code executes to make those files appear. Most likely
some rookie mistake on my part, lol
Thank you for you reply. A uname -a reveals
Linux beaglebone 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 armv7l GNU/Linux
I have browsed through your book (which looks like an excellent resource btw) and came across your Makefile with the ‘stop/start’ commands.
ls -l /sys/devices/platform/ocp/
total 0
drwxr-xr-x 3 root root 0 Oct 19 20:13 40300000.ocmcram
drwxrwxr-x 5 root gpio 0 Jan 1 2000 44e07000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e09000.serial
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e0b000.i2c
drwxr-xr-x 5 root root 0 Oct 19 20:13 44e35000.wdt
drwxr-xr-x 4 root root 0 Oct 19 20:13 44e3e000.rtc
drwxr-xr-x 9 root root 0 Oct 19 20:13 47400000.usb
drwxr-xr-x 3 root root 0 Oct 19 20:13 48038000.mcasp
drwxr-xr-x 3 root root 0 Oct 19 20:13 48042000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48044000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48046000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 48048000.timer
drwxr-xr-x 3 root root 0 Oct 19 20:13 4804a000.timer
drwxrwxr-x 5 root gpio 0 Jan 1 2000 4804c000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 48060000.mmc
drwxr-xr-x 4 root root 0 Oct 19 20:13 480c8000.mailbox
drwxr-xr-x 3 root root 0 Oct 19 20:13 480ca000.spinlock
drwxr-xr-x 4 root root 0 Oct 19 20:13 4819c000.i2c
drwxrwxr-x 5 root gpio 0 Jan 1 2000 481ac000.gpio
drwxrwxr-x 5 root gpio 0 Jan 1 2000 481ae000.gpio
drwxr-xr-x 4 root root 0 Oct 19 20:13 481d8000.mmc
drwxr-xr-x 4 root root 0 Oct 19 20:13 4830e000.lcdc
drwxr-xr-x 3 root root 0 Oct 19 20:13 48310000.rng
drwxr-xr-x 4 root root 0 Oct 19 20:13 49000000.edma
drwxr-xr-x 3 root root 0 Oct 19 20:13 49800000.tptc
drwxr-xr-x 3 root root 0 Oct 19 20:13 49900000.tptc
drwxr-xr-x 3 root root 0 Oct 19 20:13 49a00000.tptc
drwxr-xr-x 7 root root 0 Oct 19 20:13 4a100000.ethernet
drwxr-xr-x 3 root root 0 Oct 19 20:13 4c000000.emif
drwxr-xr-x 3 root root 0 Oct 19 20:13 53100000.sham
drwxr-xr-x 3 root root 0 Oct 19 20:13 53500000.aes
drwxr-xr-x 3 root root 0 Oct 19 20:13 56000000.sgx
-rw-r–r-- 1 root root 4096 Oct 19 20:13 driver_override
-r–r--r-- 1 root root 4096 Oct 19 20:13 modalias
drwxr-xr-x 3 root root 0 Oct 19 20:13 ocp:cape-universal
drwxr-xr-x 6 root root 0 Oct 19 20:13 ocp:l4_wkup@44c00000
drwxrwxr-x 3 root gpio 0 Jan 1 2000 ocp:P9_19_pinmux
drwxrwxr-x 3 root gpio 0 Jan 1 2000 ocp:P9_20_pinmux
lrwxrwxrwx 1 root root 0 Oct 19 20:13 of_node → …/…/…/firmware/devicetree/base/ocp
drwxr-xr-x 2 root root 0 Oct 19 20:13 power
lrwxrwxrwx 1 root root 0 Oct 19 20:13 subsystem → …/…/…/bus/platform
-rw-r–r-- 1 root root 4096 Oct 19 20:13 uevent
So the 4a32600*.pruss-soc-bus are missing.
I’m wondering why that would be?
I’m also wondering what driver/code create these in the /sys/devices universe?
a dmesg | grep pru
gives no output
The uEnv.txt file (which I’m assuming gets called at boot has the following line
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
ls -l /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
-rw-r–r-- 1 root root 3513 Jun 11 14:51 /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
This file does exist, although I’m not sure how to verify that the information in it will cause the PRU’s to show up.
Thanks to your posting on another topic, I was able to solve my problem. It turned out the original image flashed on the 4G onboard chip was still supplying the uEnv.txt
so the new image on the SD card was not picking up any changes I would make to the uEnv.txt file on the SD card. Once I wiped out the original image, using the
‘dd’ command, everything starting working. Your book and supplied examples are Excellent and have helped me make progress.