Bulding with Yocto


We would like to use MAVSDK on an ARM Cortex A9 based Companion Computer (connected to the drone’s PX4 Flight Controller) running a bare-bone Yocto-generated Linux.

As anyone tips on how to build the MAVSDK C++ library from source for this kind of platform?

Thank you!

Best regards.

Jean-Christophe MATHAE

I assume you have seen the build instructions here?


And for cross compilation, we usually use dockcross:

Thank you for your reply!

Clearly the MAVSDK cmake build process seems “too complex” to build with the Yocto SDK…
And I have not yet tried the dockcross process, as it seems dedicated to the server, which I do not need as we will use C++.

I could perhaps use dockcross for the C++ part with the option MAKE_INSTALL_PREFIX…

Best regards.

Jean-CHristophe MATHAE

But I must confess that I am quite new to Yocto.

After a few weeks of errance the solution seems to be:

  1. to build a Yocto SDK including cmake, that is among other things with the line
    TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake"
    in the local.conf file

  2. to install this SDK properly.

Gook luck!

Best regards.

1 Like

MAVSDK mainly uses plain cmake. For Yocto, I assume you would want to build without SUPERBUILD (which is our helper to build all dependencies) and build the dependencies yourself.

Let me ping @JonasVautherin to help you.