tip: AVRdude on mac – using built-in from arduino

More of a note to self*, since installing avrdude resulted in an avrdude without USB support. While Arduino also uses avrdude “under the hood”, but has USB support. And it would be nice if Arduino’ s avrdude can be used stand-alone, and it can:

“/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m ” is what Arduino calls in the first step of “burn bootloader”. This sets the fuses on an Atmega328p, using an usbasp programmer over USB.

Since the “burn bootloader” command did not succesfully complete, and wiring was correct, I tried this step in a terminal window but added “-B 200” to slow down the clock. Somehow the default clockrate was too fast, maybe a newer version of Arduino allready has that fixed.

This trick also works on Linux (and possibly on Windows) with a different path to the avrdude executable that Arduino uses. Enable verbose output in Arduino to see what it calls, then call that from a terminal window with modifications. (-B, -c or -t for example. Documentation here.)

On a sidenote, I still only half understand why “burn bootloader” does not support the AVR dragon… (Maybe dragon owners don’t use arduino and/or arduino users generally don’t have an AVR dragon, but all that would need to be changed is -cdragon_isp instead of -cusbasp – in an extra menu option)

*) But hopefully useful to others.



, ,




Leave a Reply

Your email address will not be published. Required fields are marked *