Atmel AVR programming on OS X

May 16, 2012 by     No Comments    Posted under: Electronics

I finally received the AVR USBASP programmer that I ordered on aliexpress.com today. I’ve been waiting for this so that I could start tinker with reflashing of ESCs and the Turnigy 9x that I had recently bought. I choose this one cause it had some built in protection (diodes) added.

It was also voltage selectable (3.3V and 5V) via adding or removing a 0ohm resistor. I plan on replacing the resistor with headers and a jumper later. It comes default as 5V which works for me, so I’ll leave it for now.

I run OS X, and most guides for things related to R/C are written for windows. I basically looked for the equivalent Mac based tools as described by the Windows based guides. I knew that I could do this cause there is nothing platform specific when it comes to working with the Atmel microcontrollers (the atmega8a that controls our ESC).

I chose to use CrossPack, by Objective Development Software, to provide me with the toolchain for working with the Atmel microcontrollers. And while I’m pretty comfortable with the OS X command line (many years of Linux), I figured that I wanted to be lazy and have a GUI interface. Thus I also chose to install AVRFuses, by Jason von Nieda, as the GUI that would hook into avrdude (comes with CrossPack and is the actual program that will flash the firmware to the ESC).

At the time of writing this, the versions that I used are (on OS X 10.7.4):

  • CrossPack-AVR-20120217.dmg
  • AVRFuses_1.4.4.zip

Installation is a piece of cake so I won’t go into that. I will however talk a bit about configuring AVRFuses so that it can talk to the AVR Programmer through avrdude.

After installing both pieces of software, open up AVRFuses and go to it’s preference pane. Here we will need to define “Path to avrdude” and if you read the readme file that came with CrossPack, you would know that it installs by default to “/usr/local/CrossPack-AVR-20120217/” and the full path to avrdude is “/usr/local/CrossPack-AVR-20120217/bin/avrdude”.

The programmer that I bought was USBASP so I selected “usbasp” (obviously), You may need to select a different option depending on your programmer. The port should again be selected based on the hardware programmer that you are using, and it is pretty safe to leave the baud rate at “[Default]”.

There has not been an update to AVRFuses since 2008, but I wanted to leave the option checked in case Jason decides to do something someday. I also left “Show avrdude Command Lines” so that I could monitor what was going on Click on “Close” and if everything is good you will see a nice green “SUCCESS” in the output console.

Now we can get ready to reflash the TX and some ESCs. I’ll write about those later on.

Got anything to say? Go ahead and leave a comment!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>