Apm - Installation Guide

by Visual Micro 2. May 2013 15:21

new August 2016. There appears to be a more up to date solution for ArduPilot developers here https://github.com/JeffyW/ardupilot/tree/development

Tip: ArduPilot wiki notes about atmel studio also apply to visual studio.

The following notes might be out of date. Please see the ArduPilot link above or the ArduPilot wiki for currnt information.

APM Developer Wikihttp://dev.ardupilot.com/wiki/building-ardupilot-apm-with-visual-studio-visual-micro/

Installation for APM versions 2.9x is quite simple. You will already have installed the APM firmware.

1) Install either Arduino 1.0.x or 1.5.x Ide or the modified diydrones Arduino ide

2) Install Visual Micro and open Visual Studio

3) If you are a first time user of Visual Micro then you might be prompted to enter your arduino ide installation location. Otherwise set via "Tools>Options>Applications & Locations". Please read the next step before closing the locations configuration window.

4) If you have not set the arduino ide sketchbook folder as instructed in the diyd instructions then set it now in Visual Studio or Atmel Studio. If you have not just completed step 3) above then click the list of applications to the left of the list of boards on the tool bar and then click "Configure" (or use tools>options>visual micro>application locations). Enter the sketchbook location against the arduino ide entry that you are using. 

5) Unzip this file into the sketchbook folder (normally the sketchbook folder is 'mydocuments\arduino'), it should create a "hardware" folder with sub folder called apm, in the apm folder should exist one boards.txt file. This zip should result in additional APM boards appearing at the bottom of the boards list in visual Micro

6) If Visual Studio was already open when you unzipped the file then click "Tools>Arduino>Reload Tool Chain"

7) Confirm that you see APM boards in the boards list

8) Enjoy and please use our forum if you encounter any difficulties


For advanced users, it is not important (optional) to install the modified Arduino IDE from diydrones. The standard Arduino ide should work well. For newer users you should install the modified Arduino ide from diydrones so that you can verify that any compile failiures are due to the APM project code and not a fault of the plugin. If the compile works in the modified arduino ide but not with Visual Micro then please report the problem to the forum.

The APM SITL board willl only compile if you have installed cygwin and set visual studio "Tools>Options>Visual Micro>Applications & Locations>Cygwin" with the location of the Cygwin install. Normally c:\cygwin. You can follow these instructions to ensure cygwin installs correctly. If you have a problem then remove the install and start again.

Visual micro will work with boards found in a file called boards.txt or vmboards.txt. Boards.txt is the standard Arduino name for the file, vmboards.txt is unique to Visual micro and will be invisible to the arduino ide. It might be a good idea to place boards for cores that the arduino ide does not understand in vmboards.txt. This will avoid the potential confusion of attempting to build a board in the arduino ide with properties that are unrecognized and might not produce the desired results.