Instructions how to build dfu-util on OS X

Install MacPorts.
Install the Java Developer Package for your OS version.

Run the below commands in a Terminal.app window:

sudo port install libusb libusb-compat git-core (mkdir somedir) cd somedir git clone git://gitorious.org/~tormod/unofficial-clones/dfuse-dfu-util.git cd dfuse-dfu-util git checkout dfuse ./autogen.sh ./configure --libdir=/opt/local/lib --includedir=/opt/local/include make (sudo make install)
Note that the first time you run dfu-util after connecting your DSO Nano it fails, just try again and it should work just fine.

The basic command line is:

dfu-util --dfuse default -a 0 -D filename.dfu

Hello Tomwid,

Thanks for your work! :slight_smile:

Thanks Tomwid, I have added this information to the wiki: http://garden.seeedstudio.com/index.php?title=Dfu-util

I tried to update to Ben’s latest release and the dfu-util claims to upgrade, but the software is not upgraded. So I followed the exact instruction via cut and paste to rebuild a new version of dfu-util, and I still lose. I am unsure if this is due to something broken on my machine or not, but I did checkout all of the ports, and port selfupdate;port update outdated shows nothing to do. Anyway the build fails the same way as before, and when I hand patch to make it build I see the same pretend to work, but not actually upgrade. If I am missing something please tell me? This is quite frustrating to me.

Log of build attempt and upload attempts
(Removed as it was politely pointed out I was uploading not downloading.)

Doing more poking I find
wiki.openmoko.org/wiki/User:SNMoore and well down on the page, in Recipe 2, it shows the same autogen.sh errors I was getting, so I don’t think it is just me. (I was getting worried there for a bit.)

Is it possible that the byte swap bugs they refer to there might be why it is not actually working for me?

And you are 100% sure you have installed “libusb-compat”?

No, this is a successful upload. However, I think you actually wanted to download to the device. Please see garden.seeedstudio.com/index.php?title=Dfu-util for examples.

Yes I included that but just to be certain

bash-3.2# port install libusb-compat
—> Computing dependencies for libusb-compat
—> Cleaning libusb-compat
bash-3.2#
The output I get when I tell it to install a package that is already installed.

I have now tested 3 macs, 2 fail and one succeeds. The successful one is running osx server, the failing one are not running server, but that is the only difference. They all have the same set of relevant ports installed. The only difference is the order and when they where initially installed.

Duh sorry about that, I was afraid I had something switched.

This now works with the dfu-util I built after patching the makefile. I do not know why this library check is botching on some macs, until I found that other reference I was beginning to believe it was just something weird in my machine. Now I can reproduce it on two mac’s and see someone else is having it I feel less bad.

Thanks for pointing out my confusion on upload download…

Oh I tried to download Benf’s 3.32 and dfu-util complains that it can not find a valid DfuSe signature, I tried specifying this via -D 0x0800[C4]000 for the app and lib, and the device starts the lib, but quickly fails and reboots in a very quick, but unending sequence. I am not sure what is going on there.

The signature error**

DSO%20BenF%20Firmware%20v3-1 rich$ dfu-util -a 0 --dfuse default -d 0x0483:0xdf11 -D DSO\ BenF\ LIB\ v3.30.dfu
dfu-util - © 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening DFU USB device… ID 0483:df11
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Device returned transfer size 1024
No valid DfuSe signature

***** one of the unsuccessful, but claimed success uploads with the address specified on the command line *****

DSO%20BenF%20Firmware%20v3-1 rich$ dfu-util -a 0 --dfuse 0x08004000 -d 0x0483:0xdf11 -D DSO\ BenF\ LIB\ v3.30.dfu
dfu-util - © 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening DFU USB device… ID 0483:df11
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
not at least 2 device changes found ?!?
Opening USB Device…
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Cannot claim interface: Permission denied
richard-hydes-macbook-air:DSO%20BenF%20Firmware%20v3-1 rich$ dfu-util -a 0 --dfuse 0x08004000 -d 0x0483:0xdf11 -D DSO\ BenF\ LIB\ v3.30.dfu
dfu-util - © 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening DFU USB device… ID 0483:df11
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Device returned transfer size 1024
address = 0x08004000, size = 32768
Erasing page at address 0x08004000, 1k page starting at 0x08004000
Setting address pointer to 0x08004000
Wrote 1024 bytes at 0x08004000
Erasing page at address 0x08004400, 1k page starting at 0x08004400
Setting address pointer to 0x08004400
Wrote 1024 bytes at 0x08004400
Erasing page at address 0x08004800, 1k page starting at 0x08004800
Setting address pointer to 0x08004800
Wrote 1024 bytes at 0x08004800
Erasing page at address 0x08004c00, 1k page starting at 0x08004c00
Setting address pointer to 0x08004c00
Wrote 1024 bytes at 0x08004c00
Erasing page at address 0x08005000, 1k page starting at 0x08005000
Setting address pointer to 0x08005000
Wrote 1024 bytes at 0x08005000
Erasing page at address 0x08005400, 1k page starting at 0x08005400
Setting address pointer to 0x08005400
Wrote 1024 bytes at 0x08005400
Erasing page at address 0x08005800, 1k page starting at 0x08005800
Setting address pointer to 0x08005800
Wrote 1024 bytes at 0x08005800
Erasing page at address 0x08005c00, 1k page starting at 0x08005c00
Setting address pointer to 0x08005c00
Wrote 1024 bytes at 0x08005c00
Erasing page at address 0x08006000, 1k page starting at 0x08006000
Setting address pointer to 0x08006000
Wrote 1024 bytes at 0x08006000
Erasing page at address 0x08006400, 1k page starting at 0x08006400
Setting address pointer to 0x08006400
Wrote 1024 bytes at 0x08006400
Erasing page at address 0x08006800, 1k page starting at 0x08006800
Setting address pointer to 0x08006800
Wrote 1024 bytes at 0x08006800
Erasing page at address 0x08006c00, 1k page starting at 0x08006c00
Setting address pointer to 0x08006c00
Wrote 1024 bytes at 0x08006c00
Erasing page at address 0x08007000, 1k page starting at 0x08007000
Setting address pointer to 0x08007000
Wrote 1024 bytes at 0x08007000
Erasing page at address 0x08007400, 1k page starting at 0x08007400
Setting address pointer to 0x08007400
Wrote 1024 bytes at 0x08007400
Erasing page at address 0x08007800, 1k page starting at 0x08007800
Setting address pointer to 0x08007800
Wrote 1024 bytes at 0x08007800
Erasing page at address 0x08007c00, 1k page starting at 0x08007c00
Setting address pointer to 0x08007c00
Wrote 1024 bytes at 0x08007c00
Erasing page at address 0x08008000, 1k page starting at 0x08008000
Setting address pointer to 0x08008000
Wrote 1024 bytes at 0x08008000
Erasing page at address 0x08008400, 1k page starting at 0x08008400
Setting address pointer to 0x08008400
Wrote 1024 bytes at 0x08008400
Erasing page at address 0x08008800, 1k page starting at 0x08008800
Setting address pointer to 0x08008800
Wrote 1024 bytes at 0x08008800
Erasing page at address 0x08008c00, 1k page starting at 0x08008c00
Setting address pointer to 0x08008c00
Wrote 1024 bytes at 0x08008c00
Erasing page at address 0x08009000, 1k page starting at 0x08009000
Setting address pointer to 0x08009000
Wrote 1024 bytes at 0x08009000
Erasing page at address 0x08009400, 1k page starting at 0x08009400
Setting address pointer to 0x08009400
Wrote 1024 bytes at 0x08009400
Erasing page at address 0x08009800, 1k page starting at 0x08009800
Setting address pointer to 0x08009800
Wrote 1024 bytes at 0x08009800
Erasing page at address 0x08009c00, 1k page starting at 0x08009c00
Setting address pointer to 0x08009c00
Wrote 1024 bytes at 0x08009c00
Erasing page at address 0x0800a000, 1k page starting at 0x0800a000
Setting address pointer to 0x0800a000
Wrote 1024 bytes at 0x0800a000
Erasing page at address 0x0800a400, 1k page starting at 0x0800a400
Setting address pointer to 0x0800a400
Wrote 1024 bytes at 0x0800a400
Erasing page at address 0x0800a800, 1k page starting at 0x0800a800
Setting address pointer to 0x0800a800
Wrote 1024 bytes at 0x0800a800
Erasing page at address 0x0800ac00, 1k page starting at 0x0800ac00
Setting address pointer to 0x0800ac00
Wrote 1024 bytes at 0x0800ac00
Erasing page at address 0x0800b000, 1k page starting at 0x0800b000
Setting address pointer to 0x0800b000
Wrote 1024 bytes at 0x0800b000
Erasing page at address 0x0800b400, 1k page starting at 0x0800b400
Setting address pointer to 0x0800b400
Wrote 1024 bytes at 0x0800b400
Erasing page at address 0x0800b800, 1k page starting at 0x0800b800
Setting address pointer to 0x0800b800
Wrote 1024 bytes at 0x0800b800
Erasing page at address 0x0800bc00, 1k page starting at 0x0800bc00
Setting address pointer to 0x0800bc00
Wrote 1024 bytes at 0x0800bc00

This was starting to seriously bug me and as I had made a fool of myself earlier I spent another hour tracking it down, since I had one working example I want to know what the issue was. (&*)_&^% apple has a old broken version of aclocal in /usr/bin. And my path on the systems that failed had it before the newer version in /opt/local/bin where port installs its wares. With the path changed it works now perfectly. And I feel pretty stupid, but it is resolved.

You probably figured it out, but just to clear this up: The upload command generates a raw memory dump from the device, which probably got written over your original dfu file. BTW, the latest git version should refuse to overwrite an existing file, but I am not sure what you have. So if you tried later to download this file it would have no dfu or dfuse header information and you will see a “signature” error.

When you specify an address for downloading, you force it into “raw” download mode instead of dfuse file mode. So if you in this case use a dfu file, the dfu/dfuse header information in the file will be copied over as well, which will break. The “real” firmware code will be shifted and all addresses will be wrong.

For future versions, I think dfu-util should be able to detect whether it is talking to a dfuse device, and then switch automatically to dfuse communication mode and expect a dfuse file (unless an advanced user wants to download a raw binary file to it). So –dfuse default will not be needed, and –dfuse address might be renamed to avoid confusion.

PS. I can tell you that you are not the first one to get confused by upload/download on microcontrollers :slight_smile:

Nice that you managed to find the issue =)

Yeah I had figured out that part, but I am still losing.
delete all copies of 3.32 redownload the commands seem to work after several tries.

Unfortunately Lib splash screen shows up with mangled App version, and runtime is a grayed line on the right with 3 tiny yellow dots, and one larger yellow blotch on the 2 chat position from the bottom. no graphing no characters, no lines. other than the grid lines. Also about the same height from the bottom is a grayed line the size of a text line that goes from left to almost the right. I have reloaded both several times and see the same result.

DSO%20BenF%20Firmware%20v3 rich$ dfu-util --dfuse default -d 0x0483:0xdf11 -a 0 -D DSO\ BenF\ APP\ v3.32.dfu
dfu-util - © 2007-2008 by OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening USB Device 0x0483:0xdf11…
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuDNLOAD-IDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuDNLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 28363)
parsing element 1, address = 0x0800c000, size = 25850
Erasing page at address 0x0800c000, 1k page starting at 0x0800c000
Setting address pointer to 0x0800c000
Wrote 1024 bytes at 0x0800c000
Erasing page at address 0x0800c400, 1k page starting at 0x0800c400
Setting address pointer to 0x0800c400
Wrote 1024 bytes at 0x0800c400
Erasing page at address 0x0800c800, 1k page starting at 0x0800c800
Setting address pointer to 0x0800c800
Wrote 1024 bytes at 0x0800c800
Erasing page at address 0x0800cc00, 1k page starting at 0x0800cc00
Setting address pointer to 0x0800cc00
Wrote 1024 bytes at 0x0800cc00
Erasing page at address 0x0800d000, 1k page starting at 0x0800d000
Setting address pointer to 0x0800d000
Wrote 1024 bytes at 0x0800d000
Erasing page at address 0x0800d400, 1k page starting at 0x0800d400
Setting address pointer to 0x0800d400
Wrote 1024 bytes at 0x0800d400
Erasing page at address 0x0800d800, 1k page starting at 0x0800d800
Setting address pointer to 0x0800d800
Wrote 1024 bytes at 0x0800d800
Erasing page at address 0x0800dc00, 1k page starting at 0x0800dc00
Setting address pointer to 0x0800dc00
Wrote 1024 bytes at 0x0800dc00
Erasing page at address 0x0800e000, 1k page starting at 0x0800e000
Setting address pointer to 0x0800e000
Wrote 1024 bytes at 0x0800e000
Erasing page at address 0x0800e400, 1k page starting at 0x0800e400
Setting address pointer to 0x0800e400
Wrote 1024 bytes at 0x0800e400
Erasing page at address 0x0800e800, 1k page starting at 0x0800e800
Setting address pointer to 0x0800e800
Wrote 1024 bytes at 0x0800e800
Erasing page at address 0x0800ec00, 1k page starting at 0x0800ec00
Setting address pointer to 0x0800ec00
Wrote 1024 bytes at 0x0800ec00
Erasing page at address 0x0800f000, 1k page starting at 0x0800f000
Setting address pointer to 0x0800f000
Wrote 1024 bytes at 0x0800f000
Erasing page at address 0x0800f400, 1k page starting at 0x0800f400
Setting address pointer to 0x0800f400
Wrote 1024 bytes at 0x0800f400
Erasing page at address 0x0800f800, 1k page starting at 0x0800f800
Setting address pointer to 0x0800f800
Wrote 1024 bytes at 0x0800f800
Erasing page at address 0x0800fc00, 1k page starting at 0x0800fc00
Setting address pointer to 0x0800fc00
Wrote 1024 bytes at 0x0800fc00
Erasing page at address 0x08010000, 1k page starting at 0x08010000
Setting address pointer to 0x08010000
Wrote 1024 bytes at 0x08010000
Erasing page at address 0x08010400, 1k page starting at 0x08010400
Setting address pointer to 0x08010400
Wrote 1024 bytes at 0x08010400
Erasing page at address 0x08010800, 1k page starting at 0x08010800
Setting address pointer to 0x08010800
Wrote 1024 bytes at 0x08010800
Erasing page at address 0x08010c00, 1k page starting at 0x08010c00
Setting address pointer to 0x08010c00
Wrote 1024 bytes at 0x08010c00
Erasing page at address 0x08011000, 1k page starting at 0x08011000
Setting address pointer to 0x08011000
Wrote 1024 bytes at 0x08011000
Erasing page at address 0x08011400, 1k page starting at 0x08011400
Setting address pointer to 0x08011400
Wrote 1024 bytes at 0x08011400
Erasing page at address 0x08011800, 1k page starting at 0x08011800
Setting address pointer to 0x08011800
Wrote 1024 bytes at 0x08011800
Erasing page at address 0x08011c00, 1k page starting at 0x08011c00
Setting address pointer to 0x08011c00
Wrote 1024 bytes at 0x08011c00
Erasing page at address 0x08012000, 1k page starting at 0x08012000
Setting address pointer to 0x08012000
Wrote 1024 bytes at 0x08012000
Erasing page at address 0x08012400, 1k page starting at 0x08012400
Setting address pointer to 0x08012400
Wrote 250 bytes at 0x08012400
parsing element 2, address = 0x080124fc, size = 2497
Setting address pointer to 0x080124fc
Wrote 1024 bytes at 0x080124fc
Erasing page at address 0x080128fc, 1k page starting at 0x08012800
Setting address pointer to 0x080128fc
Wrote 1024 bytes at 0x080128fc
Erasing page at address 0x08012cfc, 1k page starting at 0x08012c00
Setting address pointer to 0x08012cfc
Wrote 449 bytes at 0x08012cfc
DSO%20BenF%20Firmware%20v3 rich$

DSO%20BenF%20Firmware%20v3 rich$ dfu-util --dfuse default -d 0x0483:0xdf11 -a 0 -D DSO\ BenF\ LIB\ v3.30.dfu
dfu-util - © 2007-2008 by OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening USB Device 0x0483:0xdf11…
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (1 elements, total size = 13740)
parsing element 1, address = 0x08004000, size = 13732
Erasing page at address 0x08004000, 1k page starting at 0x08004000
Setting address pointer to 0x08004000
Wrote 1024 bytes at 0x08004000
Erasing page at address 0x08004400, 1k page starting at 0x08004400
Setting address pointer to 0x08004400
Wrote 1024 bytes at 0x08004400
Erasing page at address 0x08004800, 1k page starting at 0x08004800
Setting address pointer to 0x08004800
Wrote 1024 bytes at 0x08004800
Erasing page at address 0x08004c00, 1k page starting at 0x08004c00
Setting address pointer to 0x08004c00
Wrote 1024 bytes at 0x08004c00
Erasing page at address 0x08005000, 1k page starting at 0x08005000
Setting address pointer to 0x08005000
Wrote 1024 bytes at 0x08005000
Erasing page at address 0x08005400, 1k page starting at 0x08005400
Setting address pointer to 0x08005400
Wrote 1024 bytes at 0x08005400
Erasing page at address 0x08005800, 1k page starting at 0x08005800
Setting address pointer to 0x08005800
Wrote 1024 bytes at 0x08005800
Erasing page at address 0x08005c00, 1k page starting at 0x08005c00
Setting address pointer to 0x08005c00
Wrote 1024 bytes at 0x08005c00
Erasing page at address 0x08006000, 1k page starting at 0x08006000
Setting address pointer to 0x08006000
Wrote 1024 bytes at 0x08006000
Erasing page at address 0x08006400, 1k page starting at 0x08006400
Setting address pointer to 0x08006400
Wrote 1024 bytes at 0x08006400
Erasing page at address 0x08006800, 1k page starting at 0x08006800
Setting address pointer to 0x08006800
Wrote 1024 bytes at 0x08006800
Erasing page at address 0x08006c00, 1k page starting at 0x08006c00
Setting address pointer to 0x08006c00
Wrote 1024 bytes at 0x08006c00
Erasing page at address 0x08007000, 1k page starting at 0x08007000
Setting address pointer to 0x08007000
Wrote 1024 bytes at 0x08007000
Erasing page at address 0x08007400, 1k page starting at 0x08007400
Setting address pointer to 0x08007400
Wrote 420 bytes at 0x08007400
DSO%20BenF%20Firmware%20v3 rich$

Rich, I don’t think you have the latest git version. “git log -1” should list “commit e8e91cb4af4565f5dd1d1a154f21e8a9bd519ce0”.

This has now happened, and I have updated garden.seeedstudio.com/index.php?title=Dfu-util with the new syntax. As you can see there, the new code uses libusb 1.0. It would be nice if someone on Mac OS X can confirm that the build instructions are correct.

BTW, this code will soon go into the official dfu-tool version 0.5, so that it will be available through normal distributions.

I’ll give it a shot as soon as my Mac comes back from the repairman. Not even a Apple laptop survives a cup of tea poured over it :blush:

Firstly the Java Developer Package doesn’t seem to be needed any more on Lion (10.7).

Also I had to install these packages:

sudo port install libusb-devel libusb-compat git-core

Either the project still uses the old libusb api or the detection script doesn’t do the right thing.

Other than that everything works fine, but I did get this message at the end of flashing:

[code]$ dfu-util -a 0 -D ~/Hack/DSO\ NANO/DSO\ BenF\ Firmware\ v3.62/DSO\ BenF\ APP\ v3.62.dfu
dfu-util - © 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010 Tormod Volden (experimental DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening DFU USB device… ID 0483:df11
Claiming USB DFU Runtime Interface…
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0483:0xdf11] devnum=4, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12001Ka,116001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Device returned transfer size 1024
bytes_per_hash=705
Copying data from PC to DFU device
Starting download: [##################################################] finished!
state(7) = dfuMANIFEST, status(0) = No error condition is present
unable to read DFU status[/code]

Thanks for testing!

No, this must be wrong. The new code uses libusb-1.0 and can not use the old API and the libusb-compat library from macports is not needed. Please make sure you check out the dfuse-libusb-1.0 branch and that it is up to date.

Right, I forgot to checkout the correct branch :blush:

However I now get compiler errors:

$ ./configure --libdir=/opt/local/lib --includedir=/opt/local/include checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... m4/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for pkg-config... /opt/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for USB... yes checking for usb_path2devnum in -lusbpath... no checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking usbpath.h usability... no checking usbpath.h presence... no checking for usbpath.h... no checking for an ANSI C-conforming const... yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for working memcmp... yes checking for memset... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating doc/Makefile config.status: creating config.h config.status: executing depfiles commands $ make make all-recursive Making all in src CC main.o CC dfu_load.o CC dfuse.o CC dfuse_mem.o dfuse_mem.c:22:20: error: malloc.h: No such file or directory dfuse_mem.c: In function ‘add_segment’: dfuse_mem.c:33: warning: implicit declaration of function ‘malloc’ dfuse_mem.c:33: warning: incompatible implicit declaration of built-in function ‘malloc’ dfuse_mem.c: In function ‘free_segment_list’: dfuse_mem.c:72: warning: implicit declaration of function ‘free’ dfuse_mem.c: In function ‘parse_memory_layout’: dfuse_mem.c:95: warning: unknown conversion type character ‘m’ in format dfuse_mem.c:95: warning: format ‘%n’ expects type ‘int *’, but argument 3 has type ‘char **’ dfuse_mem.c:95: warning: too many arguments for format dfuse_mem.c:95: warning: unknown conversion type character ‘m’ in format dfuse_mem.c:95: warning: format ‘%n’ expects type ‘int *’, but argument 3 has type ‘char **’ dfuse_mem.c:95: warning: too many arguments for format dfuse_mem.c:111: warning: unknown conversion type character ‘m’ in format dfuse_mem.c:111: warning: format ‘%n’ expects type ‘int *’, but argument 6 has type ‘char **’ dfuse_mem.c:111: warning: too many arguments for format dfuse_mem.c:111: warning: unknown conversion type character ‘m’ in format dfuse_mem.c:111: warning: format ‘%n’ expects type ‘int *’, but argument 6 has type ‘char **’ dfuse_mem.c:111: warning: too many arguments for format make[2]: *** [dfuse_mem.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2