Install the AVR Toolchain on OS X

Programming AVRs or Arduinos is easy and convenient with the Arduino IDE. On the one hand side, the high-level Arduino libraries hide a lot of complexity and you get your results probably faster, but on the other side the concept of high-level libraries results in bloated hex-files.

If you program small or cheap AVR MCUs, these hex files might not fit in the flash.  And in the end, the Arduino IDE is basically a text editor with some syntax coloring. Therefore I prefer to program against the avr-libc with the  support of a powerful IDE like Eclipse. Here are the steps to install this AVR toolchain on OS X:

1. Download the AVR toolkit from the Cross Pack website:

2. Save the disk image

3. Run the disk image (dmg) and install the toolkit.

4. Open a terminal window and check the installation:

cd /usr/local/CrossPack-AVR-20131216/bin
avr-gcc --version

should respond to:

avr-gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

While some people are completely satisfied to program the AVR firmware with vi, some C source files, avr-gcc and make, I prefer a fully fledged and convenient IDE.

6. Download and install the Eclipse C++ IDE

7. Install the AVR-Eclipse plugin by opening inside Eclipse the Help -> Install New Software menu. In the opened window, enter AVR Eclipse Plugin and, press enter and select in the lower window the AVR Eclipse Plugin. Click Next, answer all questions with yes, wait until the installation is finished, ignore the warning about unsigned software and restart Eclipse.

8. Configure AVRDude: click Eclipse -> Preferences -> AVR menu. Check the Paths settings and if these are correct click AVRDude -> Add to configure avrdude and the appropriate programmer.

9. Now you are ready and prepared to program your first AVR project. Select New -> Project -> C-Project and the wizard will guide you and perform the initial setup of your project.

HTH Johannes

This entry was posted in Embedded Development, IoT and tagged , , , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.