pru compilation error bbb

Hello everyone I am trying to run a sonar sensor to my BBB but when compiling I am getting this error

And here is my makefile, I’m not sure what could be wrong. Ive hit a wall

I don’t have a clue what you are working on however the error messages are for missing files.

$find -name <missing file name>

Check all of them.
If they are missing you will need to install them.

What really looks bad is one of the error messages shows an exe file…that would not be in a linux package.

@vibinivan These undefined references are for functions not found by the linker in any of the objects you are passing to it. Maybe there is an object file missing (due to a source file not being compiled) or a library missing from the linker command or perhaps an incorrect library version.
In simple terms - your Makefile probably doesnt include everything it should.

@foxsquirrel That’s not a .exe file, its a reference to the function prussdev_exec_program.

1 Like

Yeah I believe I’m missing a library somewhere. To be able to use the pru I have downloaded the am335x_pru_package-master from GitHub and I have moved over the headers to my header path and the .so shared library to my lib path. I am not 100 percent sure though if I am using the right paths.

Right now I’m using /usr/local/include and /usr/local/lib as the paths. Also there is a prussdrv.h and an accompanying prussdrv.c. I’m not sure where to put that .c file.

That .c file would need to be added to your Makefile.
The easiest option is to put in your project directory (along with the other .c files and Makefile), alternatively, it can be placed at any relative or absolute path that’s appropriate if the path is specified in the Makefile.

Note: This is just generic c development advice as I’m not familliar with the specific code you’re working with.

I have another problem regarding the pru. Are you knowledgable in that by any chance ?

I’m afraid not. It’s on my list of things to dig into, but I tend to hook the beaglebone up to a separate microcontroller when I need realtime performance. So while the pru is certainly interesting for me, I already have another route that works very well and is less complex.

Pru development seems to be quite active on this list, so post your question, I’m sure there are others that can help.