Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

I've been looking for a while inside Arduino's files to find the core library. However, I haven't found them yet. Where on my hard drive can I obtain the core library files (.cpp and .h) necessary for all Arduino code?

Looking around on Google, I couldn't find a way to find the above files. I did see something about getting an .a file while Arduino is compiling, however, that isn't what I want. I want to browse the code and look at functions such as delay to see how they would react when given the values not expected. (i.e. Will my code stall if I use delay(-200); by not being to exit the loop, or will it create a black hole and disrupt the space-time continuum?)

share|improve this question
    
I was interested in the question, but what I want is the source code for strcpy and strcat in assembler source code. I downloaded the Master Library but I cannot locate anything remotely similar to strcpy or strcat. OR Maybe I cannot see the wood for the trees? –  bobzic Dec 11 at 8:51
    
@bobzic I suggest that you ask another question specifying which files you want to find. –  Annonomus Penguin Dec 11 at 12:34

3 Answers 3

up vote 5 down vote accepted

The base Arduino source files are in the Arduino installation, under hardware/*/cores/. Source for additional libraries included are in libraries/. Additional files may be found in the sketchbook under its hardware/*/cores/ and libraries/ directories.

share|improve this answer
    
And don't forget /usr/lib/avr/include/ or whatever that translates to on non-Linux systems. –  jippie Mar 21 at 18:04

The code is also available online for those times you don't have the IDE installed:

https://github.com/arduino/Arduino

share|improve this answer

On a Mac, the path to the source code folder is:
Arduino.app/Contents/Resources/Java/Hardware/Arduino/Cores/Arduino. I'd expect it would be the same from /Java/ on down in other OSes.

Path to library sources (Arduino-Mac)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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