Getting avrdude running on Mac again

It’s been a while since I did any embedded programming. As usual, multiple Mac OS upgraded have played havoc with the libraries on my Mac, with the result that avrdude no longer works.

avrdude -p m168 -c usbtiny -U hfuse:r:high.txt:r -U lfuse:r:low.txt:r
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

Sad.

I tried to install AvrMacPack as recommended on Lady Ada’s avrdude Mac setup page. The latest build of AvrMacPack is from 2014 and I couldn’t get it to work.

I found sources for avrdude-5.6 on my machine. That build but still didn’t work. I was pleased to find that the avrdude source repo is up to date. I downloaded it, brew installed libusb, configured, built and installed, and I am up and running.

bash-3.2$ make read-fuses
avrdude -p m168 -c usbtiny -U hfuse:r:high.txt:r -U lfuse:r:low.txt:r

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406 (probably m168)
avrdude: reading hfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "high.txt"
avrdude: reading lfuse memory:

Reading | ################################################## | 100% 0.00s

avrdude: writing output file "low.txt"

avrdude: safemode: Fuses OK (E:F9, H:DF, L:62)

avrdude done. Thank you.

Thanks to the avrdude maintainers!

Leave a Reply

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

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