What to install, where to install it and how to configure it. All that you want to know (hopefully).
This tutorial is based on a Windows 64 bit system. But the fact that eclipse is multi-platform should ease the things.
Installing required software
After following several tutorials I’ve make a choice on what and where to install. You can choose where do you want to put your programs. I will use pseudo code like <PathToArduino> to reference variables that depends on you, but in tables and examples I will use standard paths. In my opinion installing in default folders is a good choice. 😉
Installing Arduino software pack
- Download Arduino software from the link above.
Right now exists the version 1.0.6 of the bundle. So this tutorial will be based on that version.
- Install the Arduino software. You can easily find tutorials about how to perform this installation.
In my case <PathToArduino> will be ‘C:\Program Files (x86)\Arduino’.
Installing eclipse IDE
- Download eclipse for C/C++ from link above.
Right now the last stable version is Luna.
- Unzip your eclipse copy into the folder of your choice.
In my case in ‘C:\Program Files\eclipse\cpp_luna’. I have Windows 8.1 so ‘C:\Program Files’ is for 64bit software. If you prefer to use the 32bit version unzip it into ‘C:\Program Files (x86)’ instead.
- Initialize eclipse, for the first time you need to choose a path to your workspace.
Choose wisely (remember, default is a good choice).
Installing eclipse plugins
Well, actually you only need one plugin, AVR plugin. AVR plugin modifies tool-chain configuration to fit AVR way.
This plugin can be obtained from the link bellow. You can jump over this section if you already know how to do this.
- As you can see I disabled this link. This link is not for your browser, is a link that eclipse knows how to follow. So just copy it.
- In eclipse menu bar navigate to Help>Install New Software…
- Copy the link above to the Work with field and press enter.
- In the list bellow you will see AVR Eclipse plugin. Check it an press Next > button twice.
- Read the licenses. (Everybody skip this step… Poor license writer, nobody cares about his job)
- Accept the licenses if you agree with them.
- Accept the possible unsigned software dialog.
- Restart eclipse.
Right now you have all the software that you need but is not yet configured. Be patient.
Configuring AVR plugin
Configuring AVR toolchain is quite easy thanks to AVR plugin. This plugin will make a whole configuration schema for your AVR microcontrollers in no time. The only parameters that should be adjusted are paths to the corresponding AVR tools distributed separately. But, as you may suspect, all the tools are included in the Arduino software distribution.
- In eclipse navigate to menu Windows>Preferences. In left side tree open AVR>Paths element.
- A list of paths is shown at right.
If you followed my advice on using default paths is a matter of copying from next table.
To edit values just click on each element and then Edit… button on the right.
Path to Source Current value AVR-GCC Custom C:\Program Files (x86)\Arduino\hardware\tools\avr\bin GNU make Custom C:\Program Files (x86)\Arduino\hardware\tools\avr\utils\bin AVR Header Files Custom C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include AVRDude Custom C:\Program Files (x86)\Arduino\hardware\tools\avr\bin
- Check Disable search for system paths at startup. As you are making those paths absolute this search will have no effect.
From now eclipse and AVR plugin knows where to find the magic tools that allow you to compile small pieces of code for your Arduino.
But wait! You still need to make some configurations in your projects to tell to those tools witch architecture do they need to compile for.
Continue with “Developing for Arduino from eclipse (Part II)“