Go to http://www.obdev.at/products/crosspack/download.html
and download CrossPack for AVR development
Install the DMG file
double click the icon to run the installation
Open a Terminal and type “avrdude” in the command line.
You should see something like this.
Congratulations! You’re now ready for AVR programming.
Now let’s try and compile a demo program.
Open a terminal window and type the following
bash$ cd ~/Documents
bash$ mkdir AVR
bash$ cd AVR
bash$ avr-project Demo
bash$ open Demo
This will create a new directory called AVR under the Documents folder, and it will create a project called “Demo”.
After you type “open Demo” it will open up a window like this.
Using Xcode
Double click on the Demo.xcodeproj and it will open the Demo project in Xcode. (note: You must have Xcode installed)
Open the main.c file
Now you can edit the code.
To compile, click the RUN icon.
Let’s verify if it indeed created our HEX file.
Awesome! We now have our HEX file which we can burn to our microcontroller.