I have installed the IDE on a Mac. It works great. I want to use Eclipse as an editor only. Some files I have include "Arduino.h". Where is this file? I cannot find it.

If it is built in to the tools can I download a copy of this file(s)?


On a Mac the Arduino.h file is within the Arduino application itself. It's not that easy to get to without resorting to the command line.

You also need far more than just Arduino.h - you need the entirety of the Arduino AVR core, which is a collection of .h, .c and .cpp files. They are all together in the application.

You would probably be best off getting them from the github repository (https://github.com/arduino/Arduino) - the files you need are all under hardware/arduino/avr

On your Mac you may find them as /Applications/Arduino.app/Contents/Resources/hardware/arduino/avr or somewhere similar (not entirely sure where it puts it within the app).

  • 1
    I found them in Contents/Java/Hardware/arduino/avr/cores/arduino. I was able browse them in finder as I think I have MAC dev tools installed. – BillyBag2 Jan 23 '17 at 19:03
  • I copied all the files with Android.h. As suggested I then needed the tools file too. stdlib.h etc. I rummaged around and found these too. I want them for syntax checking only so not 100% bothered if they are the correct ones. I'm building for AVR platforms. – BillyBag2 Jan 24 '17 at 12:00

Generally, if you need to find a file you can open a terminal and type

locate myfile.dat

This looks in a database (rather than searching the disk), which you may need to update by typing

sudo updatedb                       // on linux
sudo /usr/libexec/locate.updatedb   // on Mac

There simply is no "Arduino.h" file. Basically there are multiple platforms (the most common in Arduino world is the Arduino AVR platform). Each platform can contain multiple cores (but mostly only contains 1) and each core contains a "Arduino.h" file.

So to find the Arduino.h file you need to identify the board. The board gives you the platform and the core. Based on those the Arduino.h file is in the folder [platform installation folder]/cores/[core].

The [platform installation folder] is dependent on how the platform was installed on your system. For instance arduino avr comes with the Arduino IDE and as such it is installed in the app like majenko explained.

If it is installed by the boards manager on Linux, the Arduino IDE uses ~/.arduino15/packages/[provider]/hardware/[architecture]/[version] and if I'm not mistaken the same location is used on Mac.

You can also point to a folder location where additional hardware is installed.

A word on Eclipse and Arduino. There are quite a few options to run compile Arduino sketches in Eclipse. Depending on the tool it goes from easy to pretty complex.

I personally advise to use Sloeber from sloeber.io as I am the developer.


I've don't have a Mac, so I can't test this, but on the Arduino Forum they say find the file Wiring.h and create an empty file called Arduino.h in the same folder.

I don't know if that's the right approach, but it should get you to the next error, which may well be some system constant is not defined. If it does work you could go to github for the IDE (don't know exactly where that is) and download Arduino.h from there and stick it alongside Wiring.h.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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