#define FALSE TRUE

changing the world one bool at a time...

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

How to compile AVR-Code with Mac OSX

E-mail Print PDF

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

AVRXcode_3

4. Start Xcode and choose the AVR template 

AVRXcode_4

5. modify your makefile to your needs -> Controller, clock, etc.

AVRXcode_5

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

You are here: Tutorial AVR How to compile AVR-Code with Mac OSX