$ ./dfu-util
dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
Referenced from: /Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/dfu-util/./dfu-util
Reason: image not found
Trace/BPT trap
A copy exists here /Applications/Arduino-1.6.5.app/Contents/Java/hardware/tools/avr/lib/libusb-1.0.0.dylib but that version doesn’t work.
Pretty much the same result from Arduino IDE (expected, as it uses the same utility):
dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
Referenced from: /Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/dfu-util/dfu-util
Reason: image not found
/Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/maple_upload: line 53: 69913 Trace/BPT trap: 5 ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} -R ${dfuse_addr}
Does USB programming even work under OSX? I have a USB-Serial adapter, but it’s pretty convenient to use the USB for power and programming at the same time.
However its possible there is some issue with IDE 1.6.5,
Try IDE 1.6.4
http://rudix.org/packages/libusb.html
But, I think now the issue is OSX is not really seeing the board as a USB device:
dfu-util: Invalid DFU suffix signature
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Deducing device DFU version from functional descriptor length
dfu-util: No DFU capable USB device available
Maple:
Product ID: 0x0004
Vendor ID: 0x1eaf
Version: 2.00
Speed: Up to 12 Mb/sec
Manufacturer: LeafLabs
Location ID: 0xfa134200 / 14
Current Available (mA): 500
Current Required (mA): 100
Is it maybe just very timing critical when compiling ends and you reset the board before uploading?
The original one of the new stm32duino bootloader
i.e if you have not updated the bootloader you are running the old one.
We thought there may be issues with the new bootloader being too fast for some OSX systems, specifically older macs and when you connect via an external hub.
Did you try putting the board into perpetual bootloader mode (please google this there is a youtube video on how to do it)
Sketch uses 12,604 bytes (10%) of program storage space. Maximum is 122,880 bytes.
Global variables use 3,112 bytes of dynamic memory.
/Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/maple_upload cu.usbmodemfa13431 2 1EAF:0003 /var/folders/rk/gfzqk2kd3_bfxvg0cfk3fdg40000gn/T/build7208509584741567715.tmp/Fading.cpp.bin
dfu-util 0.8
dfu-util: Invalid DFU suffix signature
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Deducing device DFU version from functional descriptor length
dfu-util: No DFU capable USB device available
Here’s what the system shows on the USB bus:
Maple 003:
Product ID: 0x0003
Vendor ID: 0x1eaf
Version: 2.01
Serial Number: LLM 003
Speed: Up to 12 Mb/sec
Manufacturer: LeafLabs
Location ID: 0xfa134200 / 14
Current Available (mA): 500
Current Required (mA): 100
(looks like just the product ID changed)
Can you find out if you have more than one version installed.
I’ll fire up my Mac and take a look at what version mine is reporting
Sketch uses 12,100 bytes (10%) of program storage space. Maximum is 110,592 bytes.
Global variables use 3,104 bytes of dynamic memory.
/Users/administrator/Documents/Arduino/hardware/Arduino_STM32/tools/macosx/maple_upload cu.usbmodem1d121 1 1EAF:0003 /var/folders/6p/knbk6cr92sscwh62_5tt20ph0000gn/T/build7155389110481267417.tmp/sketch_aug19a.cpp.bin
dfu-util 0.8
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [ ] 0% 0 bytes
Download [= ] 7% 1024 bytes
Download [=== ] 15% 2048 bytes
Download [===== ] 23% 3072 bytes
Download [======= ] 31% 4096 bytes
Download [========= ] 39% 5120 bytes
Download [=========== ] 46% 6144 bytes
Download [============= ] 54% 7168 bytes
Download [=============== ] 62% 8192 bytes
Download [================= ] 70% 9216 bytes
Download [=================== ] 78% 10240 bytes
Download [===================== ] 85% 11264 bytes
Download [======================= ] 93% 12100 bytes
Download [=========================] 100% 12100 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
dfu-util came from the github repo package for Arduino, which I cloned very recently.
In such case, I’ve resolved it in F4 by using “–dfuse-address 0x8000000” option.
There was a change to the lunix version about 2 weeks ago, but it should not effect the OSX version
1. installed ‘brew’
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homeb … er/install)”
2. installed dfu-util
brew install dfu-util
3. deleted the Arduino 1.6.5 dfu-util from the STM32 github repo
rm /Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/dfu-util/dfu-util
4. linked the new dfu-util to where the deleted was
ln -s /usr/local/bin/dfu-util dfu-util
it works:
$ /usr/local/bin/dfu-util -l
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
Deducing device DFU version from functional descriptor length
Found Runtime: [05ac:8215] ver=0208, devnum=8, cfg=1, intf=3, alt=0, name=”UNKNOWN”, serial=”7CC3A151AE16″
Now I’d like to get the new firmware on so it’s time to solder on some pins to my board. Does the new firmware solve needing to press the reset button to upload?
There is an updater sketch in the repo somewhere, i.e in the stm32duino-bootloader
Just load the sketch and press Y etc
Use at your own risk ![]()
Thank you very much for your help!
Additional it free’s up another 12k of Flash and another 3k of RAM (i.e the increase of RAM is the most important change)
Remember to select the correct bootloader option to get the extra flash and ram
1. installed ‘brew’
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homeb … er/install)”
2. installed dfu-util
brew install dfu-util
3. deleted the Arduino 1.6.5 dfu-util from the STM32 github repo
rm /Applications/Arduino-1.6.5.app/Contents/Java/hardware/Arduino_STM32/tools/macosx/dfu-util/dfu-util
4. linked the new dfu-util to where the deleted was
ln -s /usr/local/bin/dfu-util dfu-util
I upgraded the bootloader to 2.0, this is the result on Arduino. I left the IDE with the same setting above:
dfu-util 0.9
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [ ] 0% 0 bytes
Download [= ] 7% 1024 bytes
Download [=== ] 14% 2048 bytes
Download [===== ] 22% 3072 bytes
Download [======= ] 29% 4096 bytes
Download [========= ] 37% 5120 bytes
Download [=========== ] 44% 6144 bytes
Download [============ ] 51% 7168 bytes
Download [============== ] 59% 8192 bytes
Download [================ ] 66% 9216 bytes
Download [================== ] 74% 10240 bytes
Download [==================== ] 81% 11264 bytes
Download [====================== ] 88% 12288 bytes
Download [======================== ] 96% 12796 bytes
Download [=========================] 100% 12796 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode

