It's been a long time I've been looking for a good answer to this question.
Typically, any Arduino project but the simplest one will include:
- The main source code file
- Libraries specific to the project (
- Third-party libraries (generally free open source, added manually to Arduino libraries directory)
- Schematics, PCB diagrams
All this makes it hard to keep the whole code and doc of one project under Source Code Management (e.g. on Subversion, Git or GitHub).
Managing source control of your project means managing the version of all files used by the project including 3rd-party libraries.
Now for a single project, I need to define a directory structure that:
- Includes all project files as described above
- I can entirely commit to a Source Code Management tool (including 3rd-party dependencies)
- I can checkout anywhere on my hard drive and build the project from there (does it have to be a single location as imposed by Arduino IDE)
- I can zip into a self-contained archive that I can send to a friend for him to build as easily as possible (no extra manual download)
What I find particularly tricky with Arduino projects is the management of external libraries dependencies. Java projects developers have maven repositories for that and that helps a lot in managing all external deps. But we don't have an equivalent system for Arduino libraries.
I would be interested to know how other Arduino project makers deal with these aspects in their own projects.
Also note that I am open to changing my development process, including my IDE (currently I use Eclipse with the Arduino plugin most of the time, and then I ensure my projects can also work directly with the Arduino IDE).