Initially when I connected my STM32 project Windows detected new hardware and prompted to install a DFU driver. I pointed it to:
Arduino_STM32-master/drivers/win/win_xp_legacy/maple-dfu/x86 and it seemed to install just fine.
The CDC ACM driver for my application had already been installed earlier before I had started to make use of the boot loader. My CDC ACM for the USB device descriptor uses:
0x83,
0x04, // idVendor = 0x0483 STMicro
0x80,
0x58, // idProduct = 0x5880 used for this project, don't want ST's PID
I had no problems installing the drivers under XP 32b. Check the device manager for unrecognized devices, and install the drivers by “Install drivers” and pointing the correct location. First the DFU, and then the CDC serial.
Here is what I have done. I have tried to document my exact steps and restarted from scratch:
– Under XP plug my STM32 device in to make the ACM COM port appear in Device Manager then Uninstall it.
– Disconnect the device and connect back to my Linux box and use ST-Link to erase the flash using “st-flash erase”
– Flash the boot loader “st-flash write generic_boot20_pb9.bin 0x08000000”
So now it’s a fresh boot loader and my application completely erased.
On reset it does a series of quick LED blinking followed by slower blinks which repeat for ever.
No sign of a /dev/ttyACMx device so that seems normal at this stage.
– Connect STM32 device back on XP.
– Under Device manager uninstall “libusb-win32 devices -> Maple DFU”
– Unplug the USB cable to the device. Wait for 5 seconds.
– Plug the USB cable back into the device.
– Windows bottom status bar indicates Found new hardware and shows “Maple 003 then Maple DFU then Maple 003 again”.
– Windows driver Wizard appears:
* No, not this time – NEXT
* This wizard helps you install software for Maple DFU. I tell it Install from a list or….” – NEXT
* Include this location in the search: Arduino_STM32-master\drivers\win\win_xp_legacy\maple-dfu – NEXT
* XP Installs the Maple DFU driver – FINISH
Found new hardware
A problem occurred during hardware installation, your new hardware might not work properly.
Under the Device manager it has no Yellow mark next to the “libusb-win32 devices -> Maple DFU”
Maple DFU Properties -> Device Instance Id -> USB\VID_1EAF&PID_0003\LLM_003″
Command prompt:
dfu-util-static -d 1EAF:0003 -a 2 -D myfirmware_0x08002000.bin -R
I Try to run that command line after a reset of the device with short to up to 3 seconds delay but always fails…
dfu-util 0.8
Copyright.........
Invalid DFU suffix signature
A valid DFU suffix signature will be required in a future dfu-util release!!!
Cannot open DFU device 1eaf:0003
No DFU capable USB device available
To install the drivers point the location “Arduino_STM32-master\drivers\win\win_xp_legacy\” and check the box “include subdirectories”.
Can you upload with Arduino IDE?
When the IDE starts to upload after finished the build, you should press the reset button within 5 seconds.
I can tell it to update the DFU drivers but then it states already have the best driver installed. ok, so I delete it to force searching again. When I do that I select the directory location you mentioned but it reports “The location you specified does not contain any device information files.
There is no “”Search in subdirectories” check box.
There is no ACM device at present. Just have the boot loader installed so why would it request a driver for ACM?
At the moment I can’t even upload (or read out) using “dfu-util”.
I don’t understand how ACM is involved at this level. Does “dfu-util” require it? There is several revisions of the boot loader I thought. Are we talking about the same one? Maple Rev 1, Maple Rev3/Rev5 are discussed here: http://docs.leaflabs.com/static.leaflab … oader.html
Under Arduino IDE the flashing tool should work out of the box.
The stm32duino bootloader, if this is it what you are using (I don’t know any “Arduino boot loader” you mentioned in your first post), starts in DFU mode and after a second it switches to the user code, which per default uses USB serial. So your host device (XP PC) will first recognize your board as DFU device, then it should re-enumerate the USB to COM port (USB serial).
Have you uninstalled your COM port driver for Maple? If not, do it now, and then let the device manager to search for it, with the path including the serial driver, not the DFU (okay, there is no “include subdirectories” box in XP, I mixed up with Win7).
https://www.drivereasy.com/knowledge/ho … indows-xp/
I don’t have the Arduino IDE installed on the XP. Can’t see any reason to have it.
I think the problem I have is not being understood.
To upload my user code which is NOT based on Arduino build I just use “dfu-util”. My user program is entirely coded in good old “C” and I use my own Makefile and it uses the STM libraries. Previously before the boot loader I simply built it to run at 0x08000000 and used stm32flash to flash it. Now I want to use a boot loader to load it to 0x08002000. This works perfectly fine under Linux and if this was just for me then I’d leave it at that. I’m just trying to have it so that others that I give updated firmware to the ability to easily update the firmware for their devices using a boot loader and most of those will be Windows users.
As all the existing units currently in the field do not have a USB boot loader installed all will need to be flashed with the boot loader first then flash the new user firmware.
Can we forget about about the ACM device for the moment as there is no user firmware using it yet as we can’t ever get to that point.
stevestrong wrote:
“starts in DFU mode and after a second it switches to the user code, which per default uses USB serial. So your host device (XP PC) will first recognize your board as DFU device, then it should re-enumerate the USB to COM port (USB serial)
Anyway, for custom upload have a look how Arduino IDE does it:
https://github.com/rogerclarkmelbourne/ … #L110-L119
# Upload using Maple bootloader over DFU
tools.maple_upload.cmd=maple_upload
tools.maple_upload.cmd.windows=maple_upload.bat
tools.maple_upload.path={runtime.hardware.path}/tools/win
tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux
tools.maple_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.maple_upload.upload.params.verbose=-d
tools.maple_upload.upload.params.quiet=
tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
/home/staticmem/Arduino/hardware/Arduino_STM32-master/tools/linux/dfu-util/dfu-util -d 1EAF:0003 -a 2 -D /tmp/arduino_build_66769/stm32_lcstudio_blink.ino.bin -R
dfu-util 0.8
Uploads the Blinkey Sketch then switches to run mode and blinks the LED.
Anyway that’s Linux. Is the Windows Arduino going to be any different? There’s nothing that I can see that is any different to what I’m doing on the command line unless the dfu-util that Windows uses a hacked “dfu-util” ?
Looks like I’m going to have to install Arduino IDE on the XP laptop and see if it will work. That’s if it will even run under XP.
As already noted XP does not seem to like the DFU driver in the “win_xp_legacy” location and this seems to be the problem.
You could maybe use only Java and the upload java script instead of complete Arduino IDE install, also see the the maple_upload.bat file in …/tools/win folder, and the upload.pattern indicated in my previous post.
As I told, I have no problems with the DFU driver on my XP 32b machine, so I assume it is fine.
So I asked a friend to test the “dfu-util” program under a Windows 10 64 bit system.
It was found that the “dfu-util-static.exe” refuses to recognise the DFU device. So he grabbed dfu-util-0.9-win64.zip from here – https://sourceforge.net/projects/dfu-util/files/
This sort-off works but appears to have a bug as shown below. On inspecting the flash memory it appears to have flashed fully but reaches 96 or 98 percent then exits with an error message.
The FW file is 65772 bytes long. Even when trying a smaller binary it produces the same error.
dfu-util -d 1EAF:0003 -a 2 -D firmware_0x08002000.bin -R
dfu-util 0.9
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/
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
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 [======================== ] 96% 64512 bytesError sending completion packet
[Pito – Tue May 29, 2018 10:16 am] –
viewtopic.php?f=39&t=2386&p=32281&hilit … til#p32281
Hmm, what is in that post that will help in this situation?. I think you also mention somewhere you built your own binary? or are you using the one Arduino_STM32-master/tools/win/dfu-util-0.9-win64
Also this is W10 we are testing on but I think you used W7 and it appears to run to full completion.

