0

BeagleBone Black, Luna IDE & prussdrv.h
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BeagleBone Black, Luna IDE & prussdrv.h

by dhullette on Sun Mar 26, 2017 11:38 am

Hi;

I am hoping someone can help with my question.
I am a HW engineer that is learning Linux and C programming on the BBB.
I have done bare metal type programming on Microchip devices so this is a fairly big jump.

I have code running that handles a nibble wide interface to a 4 x 20 LCD.
Also have Adafruit mini pan-tilt working on the Adafruit 8 channel Servo feather wing.

So now I want to work with the PRUs. I have gotten C code to run on both PRU 0 & 1.
I did this first on the BBB itself. I then moved to TI CCSv7 and got the C compiler working.
My code from that also works. My next step was to move prussdrv.h and associated files to the Eclipse LUNA IDE.
As I mentioned, my previous C efforts on LUNA are working, however I cannot get the app loader files installed properly.
I have for the time being added the files as source files and included them as user includes.
That does work but is not good as I move forward to more complex systems.

So I am on Eclipse Luna IDE Service Release 2 (4.4.2).
I downloaded the "am335x_pru_package-master" to get the application loader programs, for example prussdrv.h. On the beagle bone this installs and runs fine, no library or include issues. As I mentioned I have not been able to get these installed with LUNA. No settings for includes, libraries, etc have worked for me.

If someone has the libraries/files from this package working on LUNA can you let me now how this is accomplished.

thanks
Dan

dhullette
 
Posts: 18
Joined: Sun Feb 28, 2016 4:53 pm

Re: BeagleBone Black, Luna IDE & prussdrv.h

by drewfustini on Sun Mar 26, 2017 11:15 pm

Hello, I've not had experience using Eclipse for BeagleBone development, but I would suggest posting your question on the BeagleBoard.org community mailing list as the audience has broad experience:
https://groups.google.com/forum/#!forum/beagleboard

I'd also recommend checking out TI e2e forum:
https://e2e.ti.com/support/arm/sitara_a ... 76/1864494

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: BeagleBone Black, Luna IDE & prussdrv.h

by dhullette on Mon Mar 27, 2017 3:31 pm

Hi Drew;

Thanks for the links, I will try those as well.
If anyone here has the information I would still appreciate seeing it.

Thanks
Dan

dhullette
 
Posts: 18
Joined: Sun Feb 28, 2016 4:53 pm

Re: BeagleBone Black, Luna IDE & prussdrv.h

by dhullette on Tue Jun 20, 2017 7:43 pm

RESOLVED???
Hi all;

Been away on travel but last night I believe I resolved my issue with the prussdrv files/libraries.
Here is what I did to get them working with no modification on Eclipse LUNA IDE.

First I created a pruss directory under /usr/include and copied the files into it.
I added the prussdrv library files to /usr/lib;

The library files in question are:
libprussdrv.a
libprussdrvd.a
libprussdrv.so
libprussdrvd.so

In the Eclipse LUNA IDE properties for the project I did the following;
Under C/C++ build, then settings, then includes:
Under Include paths (-l)
/usr/include/pruss/

Under Include files (-include)
/usr/include/pruss/pruss_intc_mapping.h
/usr/include/pruss/prussdrv.c
/usr/include/pruss/prussdrv.h

I am now able to build/compile a program that allows me to load a program and a data file to PRU1.
I also can see a PRU event on the ARM processor. I can now do this with no modification of the pruss files.

I have ported my ARM code for a 4x20 LCD in nibble mode and have it working on PRU1.

If my solution doesn't seem right or someone has a better way of doing this please feel free to share how.

Otherwise hope this helps someone.

Thanks
Dan

dhullette
 
Posts: 18
Joined: Sun Feb 28, 2016 4:53 pm

Please be positive and constructive with your questions and comments.