mirkix / ardupilotblue

Howto use BeagleBone Blue with ArduPilot
GNU General Public License v3.0
151 stars 56 forks source link

Please provide libraries you used/created #12

Closed Thalaivar closed 6 years ago

Thalaivar commented 6 years ago

A wonderful port to blue for ArduPilot, I request you to please provide the libraries you made/used that access the peripherals of the blue/BBBMini

mirkix commented 6 years ago

@Thalaivar You can find all the software in the ArduPilot source code. https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_HAL_Linux https://github.com/ArduPilot/ardupilot/tree/master/Tools/Linux_HAL_Essentials/pru/aiopru

Thalaivar commented 6 years ago

Those libraries are heavily interlinked right? Is there any way I can use them as independent libraries for my own program?

I used arm-linux-gnueabi-g++ to compile GPIOTest.cpp and put the lib directory as ~/ardupilot/libraries

I got these errors:

screen shot 2018-01-29 at 10 24 32 pm
juvinski commented 6 years ago

How are you configuring and compiling ?

Thalaivar commented 6 years ago

Apologies, but I don't understand what you mean by "configuring". As I mentioned, I simply set the arm-linux-gnueabi-g++ to search for libraries in the ardupilot/libraries folder and compile for C++11. Like this, I tried to compile GPIOTest.cpp in AP_HAL_Linux/examples

Please let me know what the possible problem can be...

juvinski commented 6 years ago

You need to use the waf utility. ./waf configure --board=bbbmini You you want to compile using make/gcc you need to include the libraries directory

Thalaivar commented 6 years ago

Yes but suppose I wanted to write a imu_read.cpp using AP libraries, I can't build with waf right? How would I write the wscript for it?

juvinski commented 6 years ago

Hi, you can use waf. You need inside the vehicle you want change the wscript file to include your sensor folder.

Thalaivar commented 6 years ago

I do not understand how th HAL is structured. I don't know how the AP_HAL_MAIN() callback works. Hence I just want to use them as normal c libraries without all the HAL call back etc. How can I do that?