2010-07-28 11:27 PM
DFuSe applet on Linux?
#dfuse-v3.0.0 #stm32-dfu-usb #dfuse #dfuse-linux #dfuse-linux #dfu #linux2011-05-17 05:00 AM
It seems to work when used from a windows VM. (compiled in linux, windows dfuse to program)
But I don't think I have a valid compilation unit, Ie my dfu file is not correct for that processor.
2011-05-17 05:00 AM
''I know that STM provides a Windows based DFuSe applet for doing this. I wonder if there is any other alternatives for development on Linux platforms.''
I am also strongly interested in this. I tried the dfu-util from http://dfu-util.gnumonks.org/ before I understood that my device has DFUse which is not standard DFU. However, dfu-util seems to get the download part right. It probably just lacks the erase part. I know I can read the all the code when I find the time, but does anyone know if only a few more steps are needed for DFUse downloading?2011-05-17 05:00 AM
To answer my own question, I have looked up all the gory specification details, studied the available source code, snooped the Windows USB stream and hacked into the late hours. Finally I have a branch of the dfu-util code which supports downloading of DfuSe files onto DfuSe devices. Please find the code at
http://gitorious.org/~tormod/unofficial-clones/dfuse-dfu-util/commits/dfuse
and test it with: dfu-util --dfuse default -a 0 -D filename.dfu It is not very sophisticated and it does not try to support DfuSe fully. For security it currently refuses to download below 0x08004000 where I have my bootloader. Probably there are a lot of bugs, but it works for me. Depending on feedback and contributions it might be more polished and feature-rich in the future.2011-05-17 05:00 AM
How do you generate the .dfu image on a linux machine?
My problem is, that I have a .s19 file on a linux machine, but I don't know how to generate the .dfu image...2011-05-17 05:00 AM
How do you generate the .dfu image on a linux machine?
My problem is, that I have a .s19 file on a linux machine, but I don't know how to generate the .dfu image... Luckily for you ST publicly defined the structure of the DFU file. If a tool doesn't already exist, it be coded by your average C programmer in a afternoon.
http://www.lmgtfy.com/?q=st+dfu+format
If such a tool isn't readily available, how much would one be worth?2011-05-17 05:00 AM
Note that my above dfuse-enhanced dfu-util can upload .bin files directly to a dfuse device as long as you provide the target address[1]. So no need to create a .dfu file in that case. Use objcopy to convert between .s19 and .bin etc.
Here is a (python) tool to create or unpack .dfu files. BTW, these tools work fine on Mac OS X also. [1]