Where is the actual compiler?

I'm working on a project which will use the underlying Arduino tools but not use the visual IDE. It will be headless, essentially. To do this I've looked at how the Ardunio IDE works. It appears to turn the processing code into C code then invoke the commandline avr gcc compiler to compile and link it. Then runs avrdude to upload it to the board.

What I can't figure out is where the actual compiler is. I've downloaded both the mac and linux versions. Both have a tools directory but it only contains the avrdude program. Yet the IDE can clearly do the compile. Is it in a jar somewhere?

Thanks,
Josh

The actual compiler is avr-gcc
/usr/bin/avr-gcc
(this is linux)

I'm running the Arduino IDE on mac. To the best of my knowledge it didn't install anything anywhere else, so I would think it's in the .app bundle.

To get those tools on Linux did you do a separate install for the compiler or was that part of the Arduino download?

The compiler is included in the download, its in: hardware/tools/avr/bin

BTW, the language isn't Processing, it is C/C++ with some higher level functionality derived from the Wiring language. The IDE does do some preprocessing of the sketch file to include some of the needed headers and create function prototypes. See: Redirecting

Weird. My copy of Arduino for Mac doesn't have that dir inside the package. But I just downloaded a new copy from here:

and it does contain the avr binaries. Thanks!

Hi Joe,

To get those tools on Linux did you do a separate install for the compiler or was that part of the Arduino download?

On Linux the compiler (gcc-avr) and the libraries (avr-libc) have to be installed seperatly by the user. The IDE expects the compiler to be on the PATH of the user. (That means If you open a console on linux and type 'avr-gcc --version' it should startup and print out its version.)

I don't know why but for some reason the Linux-IDE brings its own version of 'avrdude' so you don't have to install that seperatly to use the IDE. (But you might want this to upload code without the IDE) .

Eberhard