Press "Enter" to skip to content

Building AVRDUDE Under OS X

NOTE: This doesn’t work right. See this update.

Since I don’t do much software development, it took me a bit to understand how to get AVRDUDE to compile with libusb under OS X. These steps here have been confirmed to work for AVRDUDE v5.5 and v5.6:

– Install libusb from MacPorts: sudo port install libusb
– Extract the AVRDUDE source, change to that directory.
– Set CPPFLAGS so the libusb headers can be found: CPPFLAGS="-I/opt/local/include" && export CPPFLAGS
– Set LDFLAGS so the libusb libraries can be found: LDFLAGS="-L/opt/local/lib" && export LDFLAGS
– In the AVRDUDE source directory, run configure as the MacPorts version does: ./configure --mandir=${prefix}/share/man
– Build it: make
– Win!

UPDATE: This doesn’t actually work. It builds, but attempting to access the AVR Dragon returns the following error: avrdude: jtagmkII_getsync(): sign-on command: status -1. This also occurs with the version of AVRDUDE in MacPorts, making me wonder what exactly the AVR MacPack folks had to do to make it build properly for OS X.

One Comment

  1. spec
    spec March 14, 2017

    It worked for me on avrdude 6.3, OS X 10.12.2!! I added –libdir=/opt/local/lib –includedir=/opt/local/include to ./configure to build the binary with default paths compatible with MacPorts. None of the versions of avrdude accept a -p flag that’s compatible with avr-gcc’s -mmcu token for the attiny2313a, which breaks my Makefile and also AVRFuses. Adding :

    part parent “t2313”
    id = “t2313a”;
    desc = “ATtiny2313a”;
    ;

    after the t2313 entry in avrdude.conf.in, adds this support. Hopefully my patch is accepted upstream.

Leave a Reply