Difference between revisions of "Developing in Eclipse"

From MultiWii
Jump to: navigation, search
(Needed Software)
Line 50: Line 50:
 
* Accept the license agreement and click '''Finish'''
 
* Accept the license agreement and click '''Finish'''
 
* Allow Eclipse to restart itself
 
* Allow Eclipse to restart itself
 +
 +
== Source Code ==
 +
The MultiWii source code is managed in a Subversion repository: http://multiwii.googlecode.com/svn/.
 +
 +
The latest development version of the code is in the MultiWii_shared directory.  This code is IDE-independent, so the Eclipse projects are stored nearby, in the IDEs/Eclipse directory.  There are two projects located here: the Arduino core library and the MultiWii firmware itself.  The MultiWii firmware project uses an svn:externals tag to automatically include the code from the MultiWii_shared directory, but you don't need to understand what that means to get started.

Revision as of 16:45, 7 July 2013

MultiWii may be developed in a variety of different development environments. For those who wish to use Eclipse, there is a set of projects in the Subversion repository to make this easy to set up.

There are many different ways to set up an Eclipse environment to develop for the Arduino platform. This document describes one way to set it up under Windows. If you're using Linux, the concepts are similar, but the details will vary.

Needed Software

To set up your Eclipse development environment, you need:

Software Installation

WinAVR

You can use either the standalone WinAVR tool set or the command-line tools that come with the Arduino IDE to develop in Eclipse. The Eclipse plugin finds the standaolone WinAVR automatically, so it's easier to configure. Install it in the default location to make sure the plugin can find it.

  • Download WinAVR and install it using the default options

Eclipse

Eclipse comes in many different versions. You want the Eclipse IDE for C/C++ Developers. For this tutorial, I'm using the Kepler release. You can put it anywhere on your system that you like. You may wish to create a shortcut to eclipse.exe if you're using Windows.

  • Download and unzip Eclipse IDE for C/C++ Developers
  • Double-click eclipse.exe to start it
  • Select a location for your workspace

AVR Plugin

The AVR plugin adds the ability for Eclipse to build Arduino code and download it to the flight controller.

  • Open the Eclipse Marketplace (Menu: Help->Eclipse Marketplace)
  • Type "AVR" in the Find box and press enter to search
  • Click Install" to install the "AVR Eclipse Plugin"
  • Click "Confirm"
  • Accept the license agreement and click "Finish"
  • If you get a warning about unsigned content, click "OK"
  • Allow Eclipse to restart itself

After the AVR plugin is installed, you should confirm that it was able to automatically find the AVR tools.

  • Open the preferences (Menu:Window->Preferences)
  • Expand "AVR" and click "Paths"
  • Confirm that all of the paths point to where you installed WinAVR. The Atmel Part Description files will be blank.

Subversive Plugin

You can use any Subversion plugin you like. This tutorial uses The Subversive SVN Team Provider because it's easy to set up. Subclipse is also popular.

  • Open the Eclipse marketplace (Menu:Help->Eclipse Marketplace)
  • Type "Subversion" in the find box and press enter
  • Scroll down to find Subversive - SVN Team Provider
  • Click Install
  • Click Confirm
  • Accept the license agreement and click Finish
  • Allow Eclipse to restart itself

Source Code

The MultiWii source code is managed in a Subversion repository: http://multiwii.googlecode.com/svn/.

The latest development version of the code is in the MultiWii_shared directory. This code is IDE-independent, so the Eclipse projects are stored nearby, in the IDEs/Eclipse directory. There are two projects located here: the Arduino core library and the MultiWii firmware itself. The MultiWii firmware project uses an svn:externals tag to automatically include the code from the MultiWii_shared directory, but you don't need to understand what that means to get started.