How to compile AVR-Code with Mac OSX
This tutorial describes a way to compile C code for microcontrollers from the amtel AVR family with Mac OSX. Windows users commonly use WInAVR. This collection consists mainly of the GNU compiler collection and the AVR libc. With Mac OSX the GCC cmoes onboard because Xcode is using it as it standard compiler. Nevertheless for this tutorial we are going to use the AVR Crosspack wich comes onboard with everything we need.
step by step :
1. Download the Crosspack AVR here and install it
2. Install Xcode from the System DVD that comes with your mac
3. Download the Xcode template here and copy it into the following directory: /Developer/Library/Xcode/Project Templates/Other
4. Start Xcode and choose the AVR template
5. modify your makefile to your needs -> Controller, clock, etc.
6. write your code ;-)
7. to compile the code under "target" rightclick on firmware and choose "build firmware"
8. upload the hexfile with my new upcoming tool AVRPalX