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.

Thanks

@jwcalvert,
The Pixhawk cannot be programmed using the Arduino IDE.
It takes an entirely different IDE.
Regards,
TCIII GM

Hi,

you might want to look at the dev wiki on ardupilot.com.

Find info here dev.ardupilot.com/wiki/table-of-contents/

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

Building Pixhawk/PX4 on Windows with Make
http://dev.ardupilot.com/wiki/building-px4-with-make/

Building for Pixhawk/PX4 on MacOS with Make
http://dev.ardupilot.com/wiki/building-px4-with-make-on-mac/

Regards,
Linus

TCIII,
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.
Cheers

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?
Thanks

Hi,

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
http://dev.ardupilot.com/wiki/apmpilot_project_developer_information/#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!

Cheers,
Linus

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.

Thanks

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?

Thanks
Jim Calvert

[quote=“TCIII”]@jwcalvert,
The Pixhawk cannot be programmed using the Arduino IDE.
It takes an entirely different IDE.
Regards,
TCIII GM[/quote]

Hi TCIII,
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.
Thanks
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: http://dev.ardupilot.com/wiki/building-px4-with-make/

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.