Avrdude For Mac

I recently switched from Windows to OS X. I bought a MacBook and I already love it.

The downside is, that I have to build up the complete environment to program AVR microcontrollers again.

This is a write up of things to install and confiure to get the tool chain up and running.

Prerequisites

The AVR8 Burn-O-Mat is a GUI for AVRDUDE, an utility to download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers using the in-system programming. Free Open Source Mac Windows Linux Gui Portable Add a feature 2 Like. A couple weeks ago I got an arduino pro 328 and the gps shield. I am using arduino 0022. It worked fine but the GPSr was defective.

  • I tried to burn bootloader from a New MEGA 2560 R3 and get this error: avrdude: Expected signature for ATmega2560 is 1E 98 01 Double check chip, or use -F to override this check. I tried using ICSP interface.
  • A couple weeks ago I got an arduino pro 328 and the gps shield. I am using arduino 0022. It worked fine but the GPSr was defective.
  • AVRDUDE is a utility to download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers using the in-system programming technique (ISP).
Mac
  • Mac OS X 10.4.10
  • mySmartUSB programmer

Installation of tool chain

  • XCode 2.4.1. This package contains most tools needed for developing for Mac OS X. We need it for make and for the compiler to compile the tools further down. Download it here. Follow the instructions of the installation dialog.
  • X11. Following the instructions to install Mac Ports, we have to install X11 first. Install it from the Mac OS X installation CD #1.
  • Mac Ports 1.5.0. To be able to fetch and install ported packages, we need to install Mac Ports. Download it here. Be sure to follow the instructions and check, if Mac Ports is working.
  • AVR-GCC cross compiler and needed tools and libs. If port is running, issue
    sudo port install avr-libc
    in your terminal. That will fetch the packages and compile them.
  • avrdude 5.3.1. I am using avrdude as programmer. To fetch it from Mac Ports, issue
    sudo port install avrdude

mySmartUSB Programmer

For my programmer, mySmartUSB, a driver is needed. As the programmer uses the Silicon Labs CP2102 chip for USB-to-UART conversion, an additional driver is needed. It can be found here. After installation a reboot is recommended. The device file is only visible when the programmer is attached to the USB port. Mine is here: /dev/tty.SLAB_USBtoUART.

Test run

After having installed everything I wanted to see if my tools are working as expected. I wrote the “Hello World”-blinking LED program that all of you know. Compiling it works without problems. Programming it, reveals a problem, that I was already familiar with. avrdude was able to talk to the programmer, but complains about

Verify error - unable to read lfuse properly. Programmer may not be reliable.

Avrdude for mac download

Again. This time I just used the -u switch to overwrite the warning. My command line looks like this:

avrdude -v -u -p ATmega8 -c avr910 -P /dev/tty.SLAB_USBtoUART -U flash:w:main.hex:i

And it works!

Avrdude for mac pro

Avrdude For Mac Download

Links

Install

Avrdude Linux

  • AVR Tutorial from Lady Ada, great introduction to use a Mac with AVRs.
  • mySmartUSB programmer.