I have been using Arduino IDE for sometime with my Arduino Uno. Recently I heard about Eclipse and I thought give it a shot. I downloaded the c++ version and installed the AVR plugin. Then I tried to configure it following instructions from here: http://www.arduino.cc/playground/Code/Eclipse

When compiled the library, there was some error about 'arduino.h' not found. When I copied that file to the core library, there were more errors now.

Then I downloaded the Eclipse blink example from https://github.com/allgood38/Arduino-Blink-Eclipse-Project. It comes with its own arduino core library and compiled without any troubles. Then I uploaded it to Arduino Uno within the Eclipse itself. Everything went fine except the led on the Uno is not blinking. It just stays ON.

I have tried uploading the compiled HEX file with other program but still the result is same. Please help me to figure out what's wrong here..

If there is anybody out there who have successfully integerated arduino 1.0 with the latest version of Eclipse in windows 7, please post the URL that you have referred.

EDIT: Finally compiled a blinky project without errors. But there is still error on the CoreLibrary project. Here is the screen shot:

enter image description here

  • \$\begingroup\$ What OS are you doing this on? \$\endgroup\$ Commented Jan 4, 2012 at 8:45
  • \$\begingroup\$ OS is Windows 7 \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 8:51
  • \$\begingroup\$ Cool, unless someone gives you an answer, I will try to replicate this at lunch time if possible. I have a Win7 dual boot with Eclipse on it to test this on. \$\endgroup\$ Commented Jan 4, 2012 at 8:53
  • \$\begingroup\$ @Ramengo Which IDE are you currently using? \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 9:01
  • \$\begingroup\$ Just the Arduino one is plenty for me at the moment. When I get started with the ADK Mega I will need to use Eclipse but that will be more down to having to build the Android App than anything else. \$\endgroup\$ Commented Jan 4, 2012 at 9:03

2 Answers 2


I just built the Arduino 1.0 core as a static library in Eclipse and using Windows 7. One thing you didn't mention is that you have to get pins_arduino.h from somewhere as well. For the Uno, which uses the ATMega328P, I believe, I think you want the "standard" variant.

  • I copied into the static library project all of the files from: hardware\arduino\cores\arduino
  • I also copied into the static library project the pins_arduino.h file from: hardware\arduino\variants\standard

Could it be you just got the wrong pins_arduino.h file for your target chip? Also are you sure you have the right chip and clock speed selected under Project Settings => AVR => Target Hardware?

I would delete your Arduino Core static library project, start over by downloading the Arduino 1.0 zip file from arduino.cc, and make a new project from scratch. I just redid the process a couple times to make sure there were no problems and it's pretty quick to apply the project settings once you've done it once (took me < 5 minutes the second time).

Edit WProgram.h is deprecated in Arduino 1.0. It has been replaced by Arduino.h. Arduino libraries need to support both through #defines on the ARDUINO constant as described here. You need to define ARDUINO for the compiler as well in your main project, which you would do under Project Settings => AVR Compiler => Symbols and Project Settings => AVR C++ Compiler => Symbols respectively. You're going to want add a new Define Syms (-D) named ARDUINO with value 100 in both places I believe (ARDUINO=100).

Edit 2 I also had to explicitly include Arduino.h at the top of my blink.cpp source file (where setup and loop are defined), not sure how to do avoid compiler errors without it.

Edit 3 If you need to use Arduino Libraries, then you need to put the cpp and h files from the Arduino Library root folder into the arduinolib source folder, and any cpp and h files from the Arduino Library utility folder in an arduinolib/utility folder and include both arduinolib and arduinolib/utility in the project directory include paths (ala Project Settings => C/C++ Build => Settings => Tool Settings => AVR Compiler => Directories and Project Settings => C/C++ Build => Settings => Tool Settings => AVR C++ Compiler => Directories). You should only include those libraries in this folder that you actually use or the image will be bloated, presumably by way of each library's global variable declarations. A better way to go is probably to have separate static library projects for each Arduino library you want to use and place a project dependency on them from your main project, but that's a bit more work (could pay off in the long run though).

  • \$\begingroup\$ Ok I will try everything again.. \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 16:10
  • \$\begingroup\$ Where did you put the libcore.a file?? \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 16:11
  • \$\begingroup\$ Where can I find WProgram.h? \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 16:19
  • \$\begingroup\$ @oxakhil I built it from source. the .a file gets generated by the build process. Your "main" arduino program has to include the static library project as a dependency and will then use the built file. Basically I did "option 3" under the heading "Obtaining the Arduino Core Library " in the playground reference you lined to. \$\endgroup\$
    – vicatcu
    Commented Jan 4, 2012 at 16:19
  • \$\begingroup\$ @oxakhil Updating my answer for details about WProgram.h this... \$\endgroup\$
    – vicatcu
    Commented Jan 4, 2012 at 16:23

On Linux, before I could get Eclipse to work properly, I had to go through the preferences and change all the Arduino paths from "custom" to "system":

enter image description here

Check your paths - especially for the "AVR Header Files" entry.

  • \$\begingroup\$ Its already 'system' in the preferences for me. \$\endgroup\$
    – 0xakhil
    Commented Jan 4, 2012 at 15:00
  • \$\begingroup\$ on a side note, I've heard that the avr-gcc tool chain (not arduino-specific) in linux is wrought with peril based on developers-list discussion of late... \$\endgroup\$
    – vicatcu
    Commented Jan 4, 2012 at 15:08
  • \$\begingroup\$ What I'd like is a great editor... and then rely on the standard Arduino tool chain. \$\endgroup\$
    – Bryce
    Commented Jun 11, 2014 at 19:49
  • \$\begingroup\$ Kind of like I've been doing with UECIDE? uecide.org - unstable beta at uecide.org/beta - it's a complete rewrite of the Arduino IDE with much better features. \$\endgroup\$
    – Majenko
    Commented Jun 12, 2014 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.