Dfu-programmer installation : windows


#1

Hey all,

Can someone expand a bit on this line of the firmware update instructions, its the only instruction I can find for installing dfuprogrammer:

download the dfu-programmer binary from dfu-programmer.github.io.

How is this installed? I am not a programmer and am only aware of gitHub in the most basic sense. I’ve downloaded the zip file, which contains some folders and an executable. Running the executable does not install anything, but instead gives some errors. I have the feeling I that I should have some sort of environment or system software on my machine in order to install this, but I have no idea.

I could definitely use some help.
Any takers?


#2

the zip file does not contain an installer - it contains the actual executable, which you need to run from the command line.

so what you need to do is unzip it to some folder, then copy the firmware file to that folder. then if you have windows 7/8 go to Start (or whatever it’s called now), and start typing cmd and it should come up with Command Prompt or Command Line - right click on it and choose Run As Administrator.

it will open a new window where you have to type in the following:
c: [or whatever drive you unzipped dfu programmer to]
cd [folder where you unzipped dfu programmer]
dfu-programmer at32uc3b0256 erase
dfu-programmer at32uc3b0256 flash whitewhale.hex --suppress-bootloader-mem
dfu-programmer at32uc3b0256 start

so if you have dfu programmer unzipped to d:\dfu then you will need to execute the following:
d:
cd d:\dfu
dfu-programmer at32uc3b0256 erase
dfu-programmer at32uc3b0256 flash whitewhale.hex --suppress-bootloader-mem
dfu-programmer at32uc3b0256 start

that’s it. make sure you power up the module with the front panel button pressed first.


#3

Thanks @scanner_darkly for taking the time to write all this. I will try again tonight when I get off work! :smile:

After reading this part in the doc:

Navigate to the folder where you installed dfu-programmer

I was trying to figure out how to install it!


#4

no problem!

if that works for future updates just create a new file in the dfu folder and name it something like update.bat (extension is important) and edit it to contain the following commands, then next time you can just run update.bat or create a shortcut for it.

dfu-programmer at32uc3b0256 erase
dfu-programmer at32uc3b0256 flash whitewhale.hex --suppress-bootloader-mem
dfu-programmer at32uc3b0256 start


#5

Yes a batch file is a good idea for this! – I’ll update tonight on my progress.
Thanks again @scanner_darkly.


#6

Everything worked and I was able to update WW and ES.

Two things threw me off that might be worth modifying in the doc:

  1. The doc mentions installing dfuProgrammer which is incorrect terminology and confusing.
  2. When first tying to run the dfuProgrammer utility without a) a module hooked up via USB and b) the USB driver updated, the utility will pop up an error that lead me to believe it was not able to run on my machine.

Things to note:

  • dfuProgrammer is just a downloadable executable that comes with with some subdirectories full of files.
  • dfuProgrammer comes with its own drivers.
  • to install dfuProgrammer drivers, connect a module to your PC via USB and power it up with its button held. If it doesn’t find the drivers itself right away, go to the device manager, double click the errored device and manually load the drivers by browsing to the dfuProgrammer folder.

Thanks to @scanner_darkly for your help!!
Thanks to @tehn for graciously offering to update all my modules for me!

Great community here!


#7

glad it worked, and thank you for posting detailed info!

i should take the blame for the terminology confusion - it was taken from this thread Updating modular firmware - should’ve been more clear, apologies!


#8

Without your help I would still be stuck! :blush: :smiley:


#9

Thanks so much! This was useful to me too. Just updated my Ansible.