Here are the requirements, as I see them:
- Have a set of Eclipse projects checked into SVN to make it easy to set up and maintain a working development environment.
- Keep the Eclipse project files separate from the source code, so MultiWii can continue to exist independent of any IDE. (from Alex)
- Maintain the ability to simply open MultiWii.ino in the Arduino IDE and build. (from Alex)
- Organize the files so it is easy to set up similar environments for other IDEs.
To this end, I have a prototype on a branch: https://multiwii.googlecode.com/svn/branches/clough42/ide/eclipse-2013-07-05
This is just a branch of trunk with one new top-level directory: "Eclipse":
- Eclipse project files
- Arduino core library sources and includes.
- Eclipse project files
- MultiWii - An svn:externals reference to the MultiWii_shared folder at the root of the repository
- MultiWii_shared - included using svn:externals, above
For those of you unfamiliar with svn:externals, it's just an attribute on the Eclipse/MultiWii/src folder that references the top-level MultiWii_shared directory and indicates that it should be checked out as "MultiWii" inside the "src" directory. This allows the code to be checked out inside the Eclipse workspace/project folders on a developer's system, but there's still only one copy of the code in the repository, SVN updates it automatically and any changes to the files in the folder are automatically committed to the right place in the repository. Developers who don't want to use the Eclipse workspace can continue checking out MultiWii_shared however they're used to doing it.
You don't have to do anything special to get svn:externals to work. If you check out the Eclipse folder, you get everything you need automatically.
One other note: since the code is checked out under a directory called "MultiWii" the Arduino IDE will work properly if you just open the MultiWii.ino file.
To get up and running quickly in Eclipse:
- Set up your Eclipse toolchain (AVR Plugin, favorite SVN plugin, etc.)
- Check out the branch (above)
- Switch your workspace to the "Eclipse" folder
- Import the two projects ("Arduino" and "MultiWii")
- Build the appropriate configurations of "Arduino"
- Edit and build MultiWii
Detailed setup instructions will be coming soon.
If folks are generally supportive of this approach, I'll move the Eclipse folder over to trunk. Maybe it should be in an IDE folder, to make a natural place to check in similar efforts for other IDEs.