Press "Enter" to skip to content

Arduino on eclipse! – Part I – Intallation

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

Arduino software page

  1. 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.
  2. 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

eclipse IDE for C/C++ – Luna

  1. Download eclipse for C/C++ from link above.
    Right now the last stable version is Luna.
  2. 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.
  3. Initialize eclipse, for the first time you need to choose a path to your workspace.
    Choose wisely (remember, default is a good choice).

Cute :3If everything goes well you should see a Welcome page. You can continue.

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.

  1. 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.
  2. In eclipse menu bar navigate to Help>Install New Software…
  3. Copy the link above to the Work with field and press enter.
  4. In the list bellow you will see AVR Eclipse pluginCheck it an press Next > button twice.
  5. Read the licenses. (Everybody skip this step… Poor license writer, nobody cares about his job)
  6. Accept the licenses if you agree with them.
  7. Accept the possible unsigned software dialog.
  8. 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.

  1. In eclipse navigate to menu Windows>PreferencesIn left side tree open AVR>Paths element.
  2. 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
  3. 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)

Be First to Comment

Leave a Reply