Atmel, Hacking

Building dfu-programmer on Mac OS X

I encountered issued building dfu-programmer on Mac OS X (10.7.5) – the make script wasn’t finding the libusb include file and library – here’s how I got it to work. I am using dfu-programmer 0.6.2 and fink to install libusb; the same technique will probably work with other installs of libusb, e.g. macports, manual install, etc.

  1. Install libusb-1.0 with fink
  2. Download the dfu-programmer source from http://sourceforge.net/projects/dfu-programmer/files/
  3. Edit the configure script as follows at line 3585 (substitute your own libusb paths if necessary):
    LIBUSB_1_0_CFLAGS=-I/sw/include/libusb-1.0
    LIBUSB_1_0_LIBS="-lusb-1.0 -L/sw/lib"
  4. Configure and build:
    configure --enable-libusb_1_0
    make
    make install
  5. Enjoy!

It may be possible to specify these paths using environmental variables or on the command line when running configure, but I couldn’t get it to work.

1 Comment

Leave a Reply

Your email address will not be published.