I installed STM32duino bootloader following instructions on this web site https://medium.com/@paramaggarwal/progr … .tppplljtw
But uploading doesn’t work, my own research turns blank, so here is my questions, sorry if it was asked many times:
1. Error:
An error occurred while uploading the sketch
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: Cannot open DFU device 1eaf:0003
dfu-util: No DFU capable USB device available
2. My troubleshooting:
[69238.681209] usb 1-2.3: new full-speed USB device number 63 using xhci_hcd
[69238.758601] usb 1-2.3: New USB device found, idVendor=1eaf, idProduct=0004
[69238.758616] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[69238.758625] usb 1-2.3: Product: Maple
[69238.758633] usb 1-2.3: Manufacturer: LeafLabs
[69238.761362] cdc_acm 1-2.3:1.0: ttyACM0: USB ACM device
XXXXXXX arduino-1.8.1]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0bda:57b8 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 04f3:0389 Elan Microelectronics Corp.
Bus 001 Device 063: ID 1eaf:0004
It looks like DFU is trying to open 0003 but lsusb shows 0004, how this can be fixed?
And another question, could be related to an error, command line
/arduino-1.8.1/hardware/Arduino_STM32/tools/linux/maple_upload ttyACM0 2 1EAF:0003 /tmp/arduino_build_194473/Blink.ino.bin
says “linux”, same time my PC running linux64, is it o’k?
It looks like DFU is trying to open 0003 but lsusb shows 0004, how this can be fixed?
[NoName@localhost tools]$ pwd
/home/NoName/Softvari/arduino-1.8.1/hardware/Arduino_STM32/tools
[NoName@localhost tools]$ ls -l
total 16
-rw-rw-r–. 1 NoName NoName 0 Feb 25 21:26 boards.txt
drwxrwxr-x. 6 NoName NoName 4096 Feb 25 21:26 linux
drwxrwxr-x. 6 NoName NoName 4096 Mar 11 04:04 linux64
drwxrwxr-x. 6 NoName NoName 4096 Feb 25 21:26 macosx
drwxrwxr-x. 7 NoName NoName 4096 Feb 25 21:26 win
/hardware/Arduino_STM32/tools/linux/maple_upload ttyACM0 2 1EAF:0004 /tmp/arduino_build_982847/Blink.ino.bin
dfu-util 0.8
dfu-util: Invalid DFU suffix signature
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]
An error occurred while uploading the sketch
dfu-util: Cannot open DFU device 1eaf:0003
dfu-util: No DFU capable USB device available
Maybe to debug further you can edit the script /hardware/Arduino_STM32/tools/linux/maple_upload, and just before the last line adding an echo would help :
echo "${DFU_UTIL}" -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R
"${DFU_UTIL}" -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R
Sketch uses 16056 bytes (24%) of program storage space. Maximum is 65536 bytes.
Global variables use 2816 bytes of dynamic memory.
/home/NoName/Softvari/arduino-1.8.1/hardware/Arduino_STM32/tools/linux/maple_upload ttyACM0 2 1EAF:0004 /tmp/arduino_build_299861/Blink.ino.bin
/home/NoName/Softvari/arduino-1.8.1/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util -d 1EAF:0004 -a 2 -D /tmp/arduino_build_299861/Blink.ino.bin -R
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
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]
dfu-util: An error occurred while uploading the sketch
Cannot open DFU device 1eaf:0003
dfu-util: No DFU capable USB device available
ATTRS{idProduct}==”1001″, ATTRS{idVendor}==”0110″, MODE=”664″, GROUP=”plugdev”
ATTRS{idProduct}==”1002″, ATTRS{idVendor}==”0110″, MODE=”664″, GROUP=”plugdev”
ATTRS{idProduct}==”0003″, ATTRS{idVendor}==”1eaf”, MODE=”664″, GROUP=”plugdev” SYMLINK+=”ttyUSB%n”
ATTRS{idProduct}==”0004″, ATTRS{idVendor}==”1eaf”, MODE=”664″, GROUP=”plugdev” SYMLINK+=”maple”
I modify a symlink from maple to ttyUSB%n yesterday, probably should do the same for device 0004 now, but in device list it has name ttyACM0, where it cames from? And group, should it be dialout?
ATTRS{idProduct}==”1001″, ATTRS{idVendor}==”0110″, MODE=”664″, GROUP=”dialout”
ATTRS{idProduct}==”1002″, ATTRS{idVendor}==”0110″, MODE=”664″, GROUP=”dialout”
ATTRS{idProduct}==”0003″, ATTRS{idVendor}==”1eaf”, MODE=”664″, GROUP=”dialout” SYMLINK+=”ttyUSB%n”
ATTRS{idProduct}==”0004″, ATTRS{idVendor}==”1eaf”, MODE=”664″, GROUP=”dialout” SYMLINK+=”ttyUSB%n”
Thank you for your help.
one way is to boot into *perpetual bootloader mode*
http://docs.leaflabs.com/static.leaflab … oader-mode
Perpetual Bootloader Mode
In this mode, Maple stays a DFU device and does not jump to user code until the next reset. This is useful for guaranteeing that your Maple will be available for reprogramming.
To put your Maple (or other Maple board) into perpetual bootloader mode:
Plug your board into the USB port.
Hit the reset button (it’s the button labeled RESET). Notice that your board blinks quickly 6 times, then blinks slowly a few more times.
Hit reset again, and this time push and hold the other button during the 6 fast blinks (the normal button is labeled BUT). You can release it once the slow blinks start.
here is my dfu-util struggle with a different board from olimex
https://www.olimex.com/forum/index.php? … 6#msg22436
^^^ i commented in my post there, if you made *finger errors* playing with the boot and user buttons, u may fall into serial (uart) flash update mode
that is neither dfu nor the normal running mode, it is a ‘3rd mode’ to flash the stm32 directly via uart serial links, when ‘no led lights up’
Hit the reset button on your Maple (it’s the small button at the bottom left, labeled
RESET). Notice that it blinks quickly 6 times, then blinks slowly a few more times.
Hit reset again, and this time push and hold the other button **during** the 6 fast blinks
(the button is on the top right; it is labeled BUT). You can release it once the slow
blinks start.
Your Maple is now in perpetual bootloader mode.
if you see 1eaf:0004 when running lsusb command this is the normal running mode (your sketch is installed and running)
if you see 1eaf:0003 when running lsusb that is maple in ‘perpetual bootloader mode’ ready to load the sketch
and make sure you use a good shielded usb cable, i’ve tried a lousy unshielded usb cable which results in lots of errors and failed sketch install
source:
https://www.olimex.com/forum/index.php? … 6#msg22436
———————————– original post ——————
yes i did it! the culprit – my finger errors, thanks for all that help ![]()
https://www.olimex.com/Products/Duino/S … lation.pdf
Hit the reset button on your Maple (it’s the small button at the bottom left, labeled
RESET). Notice that it blinks quickly 6 times, then blinks slowly a few more times.
Hit reset again, and this time push and hold the other button **during** the 6 fast blinks
(the button is on the top right; it is labeled BUT). You can release it once the slow
blinks start.
Your Maple is now in perpetual bootloader mode.
other finger mistakes may put the device in serial update (serial flash update) mode, the led stops blinking
http://embedded-lab.com/blog/stm32-prog … nd-tricks/
—-
when the board is in DFU boot loader mode, in linux, it uses device 1eaf:0003 instead of 1eaf:0004
> sudo lsusb -v -d 1eaf:0003
Bus 003 Device 044: ID 1eaf:0003
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1eaf
idProduct 0x0003
bcdDevice 2.00
iManufacturer 1 LeafLabs
iProduct 2 Maple 003
iSerial 3 LLM 003
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 36
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 2
iInterface 4 DFU Program RAM 0x20000C00
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 2
iInterface 5 DFU Program FLASH 0x08005000
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 1
Will Not Detach
Manifestation Intolerant
Upload Unsupported
Download Supported
wDetachTimeout 65535 milliseconds
wTransferSize 1024 bytes
bcdDFUVersion 0.01
Device Status: 0x0001
Self Powered
> 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]
Found DFU: [1eaf:0003] ver=0200, devnum=44, cfg=1, intf=0, alt=1, name=”DFU Program FLASH 0x08005000″, serial=”LLM 003″
Found DFU: [1eaf:0003] ver=0200, devnum=44, cfg=1, intf=0, alt=0, name=”DFU Program RAM 0x20000C00″, serial=”LLM 003″
sketch install from maple ide:
Going to build using ‘armcompiler’ (ARM)
Compiling core…
No libraries to compile.
Compiling the sketch…
Linking…
Computing sketch size…
/tmp/build8700154956568391079.tmp/sketch_jul21a.cpp.bin :
section size addr
.data 12992 0
Total 12992
Binary sketch size is reported above. Check it against a 108000 byte maximum.
Loading via dfu-util
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the serial right serial port?
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming…
Searching for DFU device [1EAF:0003]…
Found it!
Opening USB Device 0x1eaf:0x0003…
Found Runtime: [0x1eaf:0x0003] devnum=44, cfg=0, intf=0, alt=1, name=”DFU Program FLASH 0x08005000″
Claiming USB DFU Interface…
Setting Alternate Setting …
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=259
Starting download: [##################################################] finished!
error resetting after download: No such file or directory
state( 8 ) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode


