Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upload the firmware from a release? #15

Open
jmound opened this issue Jan 5, 2023 · 1 comment
Open

How to upload the firmware from a release? #15

jmound opened this issue Jan 5, 2023 · 1 comment

Comments

@jmound
Copy link

jmound commented Jan 5, 2023

I see in the readme the instructions on compiling and uploading. But there are pre-built releases ready to be used. What's the command for just upgrading the firmware from a pre-compiled release?

Thanks! You all rock!

@emcniece
Copy link

Readme says: "On your computer, type make dfu to upload the firmware to the DUO." Make commands get stored in the Makefile so let's see... https://github.com/datomusic/duo-firmware/blob/master/Makefile#L137

dfu: $(TARGET).bin
	@dfu-util -d 1fc9:8189 -D "$<"

So the command looks like it'll be dfu-util -d 1fc9:8189 -D "something". Double-checking the DFU-Util docs:

-d, --device [Run-Time VENDOR]:[Run-Time PRODUCT][,[DFU Mode VENDOR]:[DFU Mode PRODUCT]]
    Specify run-time and/or DFU mode vendor and/or product IDs of the DFU device to work with
...
-D, --download FILE
   Write firmware from FILE into device. When FILE is -, the firmware is read from stdin.

The -D "something" flag is the filename, so that's gotta be $(TARGET).bin. That's probably set somewhere in the Makefile too I'd expect:

# The name of your project (used to name the compiled .hex file)
TARGET = $(notdir $(CURDIR))

That notdir looks a little confusing, I'd have to debug to figure out what it prints, but we probably don't need it. DFU docs sound like you can simply pass a filename.

So the steps would be:

  1. Download a release, extract the zip archive
  2. cd into that directory
  3. Run:
    dfu-util -d 1fc9:8189 -D duo-firmware-1.1.0-rc.5.bin

Of course you'll need to install dfu-util first 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants