Instructions to build APMrover for PIXHAWK

I need to locate a set of instructions for building the Pixhawk based APMrover.

The one I have seems to expect something else much older.
Can someone help me here.


The Pixhawk cannot be programmed using the Arduino IDE.
It takes an entirely different IDE.


you might want to look at the dev wiki on

Find info here

There are Information available for building on Windows and MacOS as well.

Building Pixhawk/PX4 on Windows with Make

Building for Pixhawk/PX4 on MacOS with Make


Thanks fro your note. I am aware of the real difference but so far I am building it with the AtmelStudio with some success except for libraries.

I may still have serious issues.

Hi Linus,

I am building it with AtmelStudio according to the instructions in “Building APM with Atmel Studio or Visual Studio & Visual Micro”.

The issue right now is finding and/or adding libraries for the *.h and *.cpp files in the APMrover2 “libraries”. This is a problem!!!

I can manually add one library file at a time to the project until I eliminate all the errors but there has to be a better way. I do this through Project > Add/Import Sketch Library > Core after moving the needed Rover libraries to that point.

Any ideas would be welcomed.
Am I wasting my time with this build strategy?


i would advise to try the Ardupilot ‘Linux virtual machine (VM) setup script’ with Virtualbox and Vagrant but cant help with Atmel Studio nor Visual Studio & Visual Micro because im not using them.

Development using VirtualBox

i only use Linux and build with make which i found is a pretty easy way since im used to my linux box.

i really dont know what else i could answer on you questions, sorry!


Hi Linus,
Thanks for your note.
I’m afraid that I am an old Windows guy who won’t give up on it.
I will struggle with this for a while longer.

Right now it seems to be a case of several forward and back slashes conflicting with the Windows path names.
Eventually I will get them fixed.


To Linus,

I took your advice and set up the Virtual Box and all of the necessary tools.
That part is running, ok I think.
BTW, I am using PuTTY as my console.

But when I run " make px4-v2" it claims that it cannot find “arm-none-eabi-gcc” which is the gcc compiler for the Pixhawk Cortex CPU.

So, I downloaded and installed “px4_toolchain_installer_v13_win” in the same directory as ardupilot. And then pointed to the bin folder there where “arm-none-eabi-gcc” is located. Still no luck.
Can you share your folder structures with me so that I can find my problems.
Any ideas?

Jim Calvert

The Pixhawk cannot be programmed using the Arduino IDE.
It takes an entirely different IDE.
TCIII GM[/quote]

I am struggling with various approaches to compile for the Pixhawk.
I am in a WINDOWS only household so must use that platform only. I have just tried installing Ubuntu under VM and had my most luck. But in all cases, libraries not being found is the issue.
Could you share the basics of your setup, what folders you have, what you installed, etc.
It would be really appreciated.
Also I have just discovered that despite the various instruction lists for compiles, none of them actually can cope with an ARM Cortex M4 CPU as instructed. That requires a different folder setup.
Can you help , please?
I have burned 11 days on this now & would really rather be coding changes than just solving the compile pitfalls.
Jim Calvert

A Note to anyone reading my mini-Blog above.

I finally succeeded in getting the compile to run. As yet I have not uploaded it into the Pixhawk. That may happen this weekend.
It took a tortuous 85 minutes on a fast quad-cpu Win 7 system. That should be improved once I set exclusions in Bitdefender and Malwarebytes.
For those wondering, I used the setup found here:

Thanks to all who gave suggestions.

Some folks may be interested in my compile times as follows:

  1. First compile with make px4-v2 time: 01:25:00
  2. I ran a full clean with px4-clean time: 00:03:00
  3. I added folder exclusions for GitHub in Bitdefender and Malwarebytes
  4. Second compile with make px4-v2 time: 01:02:00 a real improvement
  5. I made a small change to some of the APMrover2 code and with NO clean.
  6. Third compile with make px4-v2 time: 00:02:10 very short.

This was done on a quad-cpu Win7 machine.
That’s it.