Difference between revisions of "EBC Exercise 30 PRU via remoteproc and RPMsg"
m |
m (Yoder moved page EBC Exercise 30 PRU to EBC Exercise 30 PRU via remoteproc and RPMsg: Makes clear how the PRUs are accessed) |
(No difference)
|
Revision as of 08:45, 11 July 2016
Embedded Linux Class by Mark A. Yoder
Here's how to setup a Bone to play with the PRUs. I'm running with
bone$ uname -a
Disable the HDMI
The PRUs have direct access to many pins that are also used by the HDMI. Check to see if the HDMI has been disabled.
bone$ config-pin -q P8_45 P8_45 pinmux file not found! cape-universala overlay not found run "config-pin overlay cape-universala" to load the cape
If you get the message above, you need to disable your HDMI. Do it by editing /boot/uEnv.txt and uncommenting the following by removing the # in front of the dtb line:
##BeagleBone Black: HDMI (Audio/Video) disabled: dtb=am335x-boneblack-emmc-overlay.dtb
Then reboot and try again.
bone$ config-pin -q P8_45 config-pin -q P8_45 P8_45 Mode: default Direction: in Value: 0
Good the HDMI is now disabled. Later we'll use config-pin to set pins to the PRU.
Setting up the PRU compiler
The PRU compiler should already be installed.
bone$ which clpru /usr/bin/clpru
If not, you'll have to search around to learn how to install it. (Beyond the scope of this page.)
However some setup must be done so it can find all the libraries it needs.
bone$ export PRU_CGT=/usr/share/ti/cgt-pru bone$ cd $PRU_CGT bone$ mkdir bin bone$ cd bin bone$ ln -s `which clpru` . bone$ ln -s `which lnkpru` .
The variable PRU_CGT is used by the Makefiles and scripts to know which compiler to run. I suggest you put export PRU_CGT=/usr/share/ti/cgt-pru in your .bashrc file so it's set every time you login. The other commands only need to be run once.
Installing Examples
I've found some examples that are a good starting point.
Follow these instructions
host$ cd Downloads host$ wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.7z host$ wget http://www.rose-hulman.edu/~yoder/Beagle/BeagleBone_Rev_A6A_Production_08_14_2012.md5
- Download and install Ubuntu's Win32DiskImager (also known as the win32-image-writer).
- Download and install 7-zip compression software. (Or use winRAR)
- Decompress ETC2012.img.bz2 image file using 7-zip (or winRAR).
- Insert >=4GB SD card into the reader/writer.
- Start the Win32DiskImager.
- Select ETC2012.img and correct SD card location.
- Click on Write.
After the image writing is done (this will take some 10 minutes), eject the SD card.
Embedded Linux Class by Mark A. Yoder