From 1956c68e16ade5853f4b03b4f557b397d5750218 Mon Sep 17 00:00:00 2001 From: Siddharth Bharat Purohit Date: Mon, 30 Jun 2014 22:19:08 +0530 Subject: [PATCH] Linux: Add usage steps for PRU firmware to Readme --- Tools/Linux_HAL_Essentials/testpru/README.md | 32 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Tools/Linux_HAL_Essentials/testpru/README.md b/Tools/Linux_HAL_Essentials/testpru/README.md index 784d2e9957..69759129bc 100644 --- a/Tools/Linux_HAL_Essentials/testpru/README.md +++ b/Tools/Linux_HAL_Essentials/testpru/README.md @@ -1,4 +1,32 @@ -testpru +PRU PWM ======= -PRU PWM +###Updating kernel +* Check your kernel version using `uname -r` +* If you get 3.8.13bone56+ as output then you may skip Updating kernel. +* For other kernel versions write following cmds in your BBB: +``` +wget https://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone57/install-me.sh +chmod +x install-me.sh +./install-me.sh +``` +* After above steps reboot and check your kernel version using `uname -r`,it should be `3.8.13bone57` + +###Setting Up PRU Compiler +* Download [PRU C Compiler v2.0.0B2 installer](http://software-dl.ti.com/codegen/non-esd/downloads/beta.htm) +* Please check the path where you install PRU compiler. +* Setting environment variable +``` +echo export PATH=/path/to/pru/compiler/bin:$PATH > ~/.bashrc +echo export PRU_C_DIR="/path/to/pru/compiler/include;/path/to/pru/compiler/lib" > ~/.bashrc +source ~/.bashrc +``` + +*note: semicolons in second command were intended* + +###Compiling and loading the code +* just `make` +* copy generated executable `testpru1` to `ardupilot/Tools/Linux_HAL_Essentials/`. +* To load firmware use + - `./startup.sh load` : only once after reboot it will copy overlays and firmware to `/lib/firmware/` and loads them. + - `./startup.sh reload` : it only copies firmware to `/lib/firmware/` and reloads pru firmware.