2014-06-30 13:49:08 -03:00
|
|
|
PRU PWM
|
2014-06-30 10:15:36 -03:00
|
|
|
=======
|
|
|
|
|
2014-06-30 13:49:08 -03:00
|
|
|
###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`
|
|
|
|
|
2014-07-04 06:37:48 -03:00
|
|
|
----
|
|
|
|
|
|
|
|
NOTE: For Ubuntu different scripts shall be used. E.g., for precise:
|
|
|
|
- http://rcn-ee.net/deb/precise-armhf/v3.8.13-bone57/install-me.sh
|
|
|
|
|
|
|
|
----
|
|
|
|
|
2014-06-30 13:49:08 -03:00
|
|
|
###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
|
|
|
|
```
|
2014-07-04 13:06:14 -03:00
|
|
|
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
|
2014-06-30 13:49:08 -03:00
|
|
|
source ~/.bashrc
|
|
|
|
```
|
|
|
|
|
|
|
|
*note: semicolons in second command were intended*
|
|
|
|
|
|
|
|
###Compiling and loading the code
|
|
|
|
* just `make`
|
2014-07-01 08:23:12 -03:00
|
|
|
* copy generated executable `pwmpru1` to `ardupilot/Tools/Linux_HAL_Essentials/`.
|
2014-06-30 13:49:08 -03:00
|
|
|
* 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.
|
2014-07-04 06:37:48 -03:00
|
|
|
|