Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BeaglePilot/PRUSS-C
PRU C compiler test
https://github.com/BeaglePilot/PRUSS-C
Last synced: 3 months ago
JSON representation
PRU C compiler test
- Host: GitHub
- URL: https://github.com/BeaglePilot/PRUSS-C
- Owner: BeaglePilot
- Created: 2014-02-27T09:31:57.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-05T16:46:55.000Z (almost 11 years ago)
- Last Synced: 2023-08-07T10:21:53.548Z (over 1 year ago)
- Language: C
- Size: 8.86 MB
- Stars: 23
- Watchers: 4
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeCompiler - PRUSS-C
README
PRUSS-C
=======C Library for the BeagleBone (Black) Programmable Realtime Unit SubSystem
###Compiling App Loader
git clone https://github.com/BeaglePilot/PRUSS-C.git
cd PRUSS-C/am335x_pru_package/ pru_sw/app_loader/interface
make
cd ../lib
scp libprussdrv.so [email protected]:/usr/local/lib
###Basic Command for Compilation
You can find an example blinkled PRU code @ `PRUSS-C/am335x_pru_package/pru_sw/example_apps/blinkled/blinkled_pru.c`
####for 64-bit systems only:
sudo apt-get install ia32-libs-multiarch
####else for 32-bit systems start from here
######for x86_64/i686
export PRU_C_DIR="/opt/ti/PRUCGT1.0.0B1/include;/opt/ti/PRUCGT1.0.0B1/lib"
export PATH="/opt/ti/PRUCGT1.0.0B1/bin;/opt/ti/PRUCGT1.0.0B1/;/opt/ti/PRUCGT1.0.0B1/example":$PATH
clpru --silicon_version=3 -o1 blinkled_pru.c -z AM3359_PRU.cmd -o PRU_tests.out -m PRU_tests.map
hexpru bin.cmd PRU_tests.out
This generates 2 files: data.bin (containing the data sections) and text.bin (containing the .text sections).
######for arm systems
export PRU_C_DIR="/path/to/ARMLinuxA8/include;/path/to/ARMLinuxA8/lib"
export PATH="/path/to/ARMLinuxA8/bin:/path/to/ARMLinuxA8/:/path/to/ARMLinuxA8/example":$PATH
clpru --silicon_version=3 -o1 blinkled_pru.c -z /path/to/ARMLinuxA8/AM3359_PRU.cmd -o PRU_tests.out -m PRU_tests.map
hexpru /path/to/ARMLinuxA8/bin.cmd PRU_tests.out
This generates 2 files: `data.bin` (containing the data sections) and `text.bin` (containing the instruction sections).###Compiling PRU source code with StarterWare driver library
Examples included inside the PRUSS_LIB :- blinkled
cd PRUSS_C/PRUSS_LIB/
export PRU_BASE_PATH=path/to/PRUSS_LIB
export PATH="/path/to/ARMLinuxA8/bin:/path/to/ARMLinuxA8/":$PATH
cp path/to/ARMLinuxA8 path/to/PRUSS_LIB
cd example
makeThis generates 2 files: `build/data.bin` (containing the data sections) and `build/text.bin` (containing the instruction sections).
###Compiling your BBB main app
#####Example blinkled:
cd PRUSS-C/am335x_pru_package/pru_sw/example_apps/
make
cd bin/
scp blinkled [email protected]:~/
###Executing your Application on BBB
Copy data.bin and text.bin to the same folder as blinkled application.Note:follow the steps in the shown order
export LD_LIBRARY_PATH=/usr/local/lib
modprobe uio_prussCreate BB-PRU-00A0.dts with contents as shown @ http://hipstercircuits.com/category/pru/ and load the cape using capemgr.
and finally
./blinkledyou should see two LEDs blinking