Arduino Eclipse Development Environment for Mac OS X

This is a short guide on how to setup Eclipse for Mac OS X Lion (10.7) for use with Arduino in a relatively short amount of time.  Using this guide, Eclipse can be setup to program and download code onto Arduino microcontrollers in about 15 minutes by using the Arduino Eclipse Plugin.

Initial Steps

To begin, download the following:

Installing Eclipse on Mac OS X is quite simple: extract the Eclipse package to the /Applications/ folder or another convenient location.  Then simply drag the file to the dock from the /Applications/eclipse/ folder.

Next, install the Arduino IDE.  Once again, this is just a matter of extracting the zip file somewhere and dragging the file to the Applications folder.

Installing the Arduino Eclipse Plugin

Note: If this part of the instructions seems to be outdated, head over here and follow the instructions.  This is a modified version of those instructions specifically for Mac OS X and the plugin version 1.1.7. 

Now that Eclipse is installed, start it and choose a workspace (the default will work fine).  If this is the first time Eclipse has been opened, close the welcome screen.  Then, navigate to Help -> Install New Software and add a new site:  Check the latest arduino eclipse extensions under arduino and click next.

Finish going through the installation and restart eclipse when prompted at the end.


The last part is merely a matter of configuration.  Eclipse should now be loaded with the workspace visible.  From the application menu, navigate to Eclipse -> Preferences (shortcut command + ,) and then Arduino -> Arduino in the Preferences pane.

In order for Eclipse to use proper compilers and libraries for Arduino, the location of the Arduino IDE must be set.  Users familiar with Mac OS X may know that .app files are actually just containers for application files (right click on any app and choose Show Package Contents in Finder).  The files needed by the plugin are located in the container.  If the application was added to the /Applications/ folder simply copy and paste this path into Arduino IDE path:


If the application was installed to another location, simply modify this path appropriately.

Note: Sometimes simply copying and pasting this path does not work, and the location must be browsed to instead.  In the Finder file browsing window, browse to this path directly by pressing command + shift + g.

Next, in preferences move to AVRDude and copy this path into the AVRDude config file field. Once again, and from now on, modify the path if the was installed to another location.


Now move to Paths and replace each path with the appropriate location listed below:

AVR-GCC, GNU make, and AVRDude


AVR Header Files


Also be sure to check off Disable search for system paths at startup so these paths are not reset next time Eclipse is opened.

Additional Recommended Configuration

In Preferences, navigate to General -> Workspace and check Save automatically before build.

Under C/C++ -> Indexer it may be necessary to check Index unused headers and Index source and header files opened in editor.  Some installations also do not seem to automatically index the HardwareSerial library, and Eclipse will mark it as not able to be found.  Therefore, under Files to index up-front append “HardwareSerial.h” onto the end without quotes.

The Eclipse environment is now ready to create a new Arduino project.

Creating An Arduino Project In Eclipse

To start a new project using the plugin, go to File -> New -> Project… in Eclipse and select New Arduino sketch from the Arduino folder.  Click next and name the project, then click next again and choose the Arduino Board that will be programmed from the drop down menu.  Then type in the port where the board is located (e.g. /dev/tty.usbmodemfa131).  To find out what port the board is using, plug it into the computer and check using the Arduino IDE application or open terminal and type the following command to list external devices.

ls /dev/tty.*

If the board is not available, leave the port field blank or use a placeholder value to change later.  Click finish and the new project will be created.

Importing A Library

Another great feature of the Arduino Eclipse plugin is the ability to import libraries quickly.  To import a library to a project, right click on it in the project explorer and choose import.  Under the Arduino folder, choose Import a arduino library in the current project and choose next.  Next, browse to or type the location of the library to import (e.g. the Servo library is located at /Applications/ and click finish.

To use the library, simply include it in the project header file (e.g. #include “Servo.h”).  Note that code copied from the Arduino IDE using an imported library will need to be changed so that the include statements use double quotes (“”) instead of angle brackets (<>).

Indexer Problems

If, at this point, Eclipse is underlining a lot of code in red, save and build the project first.  If it is still underlining code in red, then try going to Preferences, C/C++ Settings -> Indexer and uncheck Enable indexer, click Apply, recheck it, and click OK.  This should re-run the indexer.  It may also help to open header or cpp files that contain objects or functions that cannot be found when the indexer is re-run.  This seems to be a bug in the Eclipse indexer for Mac.

For all other troubles, here is a link to a thread that was very useful.


After reading this short tutorial, you should be able to configure an Arduino programming environment in Eclipse for Mac OS X relatively quickly.  A lot of credit is due to Jantje for making such a fantastic plugin!  Please leave comments if you appreciate this tutorial or have suggestions.

61 thoughts on “Arduino Eclipse Development Environment for Mac OS X

  1. Thanks for this document. I’ll have a look to modify the plugin so he provides the correct configuration.
    Best regards

    • I’m glad to hear it worked for you.

      Unfortunately I don’t know of a way to monitor the serial port from within Eclipse. However, you can still use the Serial Monitor program in the Arduino IDE just fine. I personally use CoolTerm [] for Mac because it’s very clean and simple to use. Just make sure you set the baud rate in your code and in CoolTerm to match.

      • Thanks for the hint again. I have just installed Coolterm.

        Just one more question: I have got a few libraries with a ifdef checking Arduino’s version and I am using Arduino V1. However, when I build it from Eclipse it seems to not pick up this variable. Thus, I guess I have to specify that somehow. Would you know how?

        That is the example.

        #if defined(ARDUINO) && ARDUINO >= 100
        #include “Arduino.h”
        #include “WProgram.h”

      • thanks a lot you saved my day – serial output after hours of research!

    • I have just realized that my problem is actually related to imported libraries. For some reason the libraries are not compiling because they can’t find Arduino.h. The files created by the Arduino plugin can find it, tough.
      Any clues?

  2. Make sure your libraries use double quotes instead of angular brackets.
    #include “Arduino.h” instead of #include <Arduino.h>

    • Hmm, why are you using a port number 411? You need to use the path to the Arduino board. It should be something like /dev/tty.usbmodemfa131

  3. Great explanation!! I lost one day to try to configure my eclipse environment.
    but I have a problem in uploading the sketch: “AVRDude Upload has encountered a problem” in Details I read: Could not initializate class”. Please help me.

  4. I can compile but when invoke AVR I get an alert:

    AVRDude does not support the project target MCU [ATmega328P]
    Please select a different target MCU if you want to use AVRDude.
    (Properties -> Target Hardware)

    Is it really impossible to develop for the Arduino Uno using Eclipse?

    • No it should work fine with the Uno! Make sure you select Arduino Uno as the board type on the right port.

    • I had the same error.Resolved by:

      check: Use Arduino IDE tools in Eclipse

      Then it uploads without a problem!

  5. Is anyone else having permissions problems accessing the update site link?

  6. snowroad
    Several people have reported problems to connect to the update site.
    In most cases it is related to the spaces in the url name.
    You can also use a non space name by using
    The site is located on a respected web service provider.
    Best regards

  7. Pingback: scheck media Blog - » erste Schritte mit dem Arduino Projekt

  8. Hello I just downloaded Eclipse juno for Mac OSX 64 bit and then i downloaded Arduino EID software1.0.1. was sent to the application folder. I opened eclipse juno and installed the plug in v2.0.4 and when i go to eclipse>preference>arduino i cannot select the It shows in the application folder that it is there but i cannot select it i tried writting the adress manually but it doesnt work i cannot select the ok button to save the changess I need help installing this.

  9. Hi there,

    I’m having problems building the NanodeUIP example in eclipse. It builds fine in the Arduino IDE.

    It is giving me the following error on building:
    /Applications/ warning: sys/time.h: No such file or directory

    Any ideas?

    Thank you

    • Hi
      you say it is an error but the comment states it is a warning.
      Are you aware the plugin compiles at warning level “all” while the Arduino IDE 1.0 and lower uses a lower warning level?
      Best regards

  10. Hi!

    Excellent article – however, after installing Eclipse (Juno) and plugin v1.2.4, I get the following if I try to build an empty project for the Mega2560:

    Errors occurred during the build.
    Errors running builder ‘CDT Builder’ on project ‘Test’.
    Internal error building project Test configuration Release
    Internal error building project Test configuration Release

    Any ideas what’s going on?

    • It says it gives you errors but it actually succeeded building. You have to hit the build button and then the “Upload current project to AVR” button, both of which will give you errors. It WILL upload though.

  11. Hello, first of all congratulations for this great tutorial and apologize for my english, it’s not very good.
    I followed all the steps to the tutorial but I have a little problem… I can upload the program to the arduino but there are something that not works ok.
    If, for example, I write “Serial.begin();” I appear 3 errors like:
    1-“make:***[pruebaBlink.o]Error 1”
    2-“Method ‘begin’ could not be resolved”
    3-“Symbol ‘Serial’ could not be resolved”

    Thank you so much.

  12. Pingback: Notes on getting the Arduino Eclipse plugin working with reaDIYmate | My hovercraft is full of elks

  13. I installed it in mac osx lion. I can build a project. Everytime I upload it it says: ‘port /dev/tty.usbmodem26221 already in use. Try quiting any programs that may be using it’

    But it DOES upload the sketch successfully and it is run on the Arduino.

    I have no idea what is using the port. I closed the Arduino IDE.

  14. No problem, I really appreciate your work.
    Just ‘bought’ you a Leonardo 🙂


  15. I imported the Wire library.
    Added “#include “Wire.h” in the header file.

    I keep getting:
    “/libraries/Wire/Wire.cpp:26:19: warning: twi.h: No such file or directory”

    I tried to include “twi.h” in the header also.

  16. Hi, I tried this and compilation works fine.
    But when I try to upload to my micro I get:
    Launching /Applications/ -C/Applications/ -patmega32u4 -cavr109 -P /dev/tty.usbmodemfd131 -b57600 -D -Uflash:w:/Users/mike/Documents/Programmieren/Eclipse/micro/Release/micro.hex:i

    and thats it. Progress (avrdude) gets stuck and I can wait endlessly.

    Any suggestions?
    Serial Monitor works and gives Numbers like:

  17. I do not leaave a lot of responses, but i did a few searching and wound up here Arduino Eclipse Development Environment for Mac OS X |
    Mechatronics Project Site. And I do have a couple of questions for you if you tend not to mind.
    Could it be only me or does it appear like some oof these responses appear as if they
    are coming from brain dead individuals? 😛 And, if you are posting at
    other online sites, I’d like to keep up with everything new you have to post.
    Could you make a list of all of your communal pages like your linkedin profile,
    Facebook page or twitter feed?

  18. I see a lot of interesting articles on your blog. You have to
    spend a lot of time writing, i know how to save you a lot
    of work, there is a tool that creates unique, google friendly articles in couple of seconds, just type in google – laranita’s free content

  19. Great blog here! Also your web site loads up very fast! What
    host are you using? Can I get your affiliate link to your host?
    I wish my web site loaded up as quickly as yours lol

  20. I read a lot of interesting posts here. Probably you spend a lot
    of time writing, i know how to save you a lot of time, there
    is an online tool that creates high quality, google friendly
    posts in seconds, just search in google – laranitas free content source

  21. Fantastic site you have here but I was curious about if you knew of any user discussion forums that cover the same topics talked about here?
    I’d really love to be a part of community where I can get opinions from other experienced people that share the
    same interest. If you have any suggestions, please let me
    know. Thank you!

    Visit my web blog – svenska casinon på nett

  22. Hi guys,

    When I try to compile the project on my mac this is the error i get; i’m not sure where the solution is to be found, hope one of you can help me!

    avrdude: reading input file “/Users/Arjan/Dropbox/source codes/workspace2/Arduino/Release/Arduino.hex”
    avrdude: can’t open input file /Users/Arjan/Dropbox/source codes/workspace2/Arduino/Release/Arduino.hex: No such file or directory
    avrdude: read from file ‘/Users/Arjan/Dropbox/source codes/workspace2/Arduino/Release/Arduino.hex’ failed

    Thanks a lot!!


  23. It appears that installing the plugin fails. Is there a workaround for this?

    An error occurred while collecting items to be installed
    session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    Artifact not found:
    Artifact not found:
    Artifact not found:
    Artifact not found:
    Artifact not found:
    Artifact not found:
    Artifact not found:

  24. Pingback: 12ヶ月前、アカザのコーニングはメルボルン運転フェラーリ初もぎ取る大会冠。ウブロスーパーコピー今年から見れば、オーストラリアの全体の2008フォーミュラ1シーズンは、4位のタグホイ

Comments are closed.