Dfu-util cannot flash GIGA

The example to flash GIGA firmware (for micropython work) doesn't work. The dfu-util utility cannot detect any device connected to the desktop where the utility runs. Despite the initial assistance from the dfu-util team to get the port working by setting the rules permission, the second round of request for assistance to the team (i.e. flash firmware) seems to have mistakenly turned into boiler-plate response by Tormod.

I am accustomed to drag-n-drop to flash firmware (a la Raspberry Pico). The instructions for GIGA explicitly state that dfu-util must be used. Since dfu-util (lastest version) successfully enabled the port for use by Arduino IDE 2.4 to upload sketches to GIGA, I presume that dfu-util is working properly on my desktop.

Yet the following command draws a blank:

$ /usr/bin/dfu-util --verbose -l
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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/

libusb version 1.0.26 (11724)

and the following simply responds that no device is available (when run without the -w option):

$ /usr/bin/dfu-util --verbose -w -a 0 -d 2341:0366 -D GIGAR1_MP_FW.dfu
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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/

libusb version 1.0.26 (11724)
DFU suffix version 11a
Waiting for device, exit with ctrl-C
^C

What additional steps can I perform to flash the firmware on GIGA? Thanks.

Regards.

P.S.
Computer environment: Ubuntu 22.10
dfu-util version: 0.11
DFU suffix version 11a
libusb version 1.0.26 (11724)
Device: Arduino GIGA R1 WiFi

Hi there @baqwas ! Before you run the dfu-util command, did you put the board in bootloader mode? This is required in order to install MicroPython on the board. If the green LED is fading in and out, the board is in bootloader mode and you should be able to use dfu-util.

I just tested this and it worked (using the FW provided in the example).

Hello @ksoderby,

Of course, I did! I provided detailed output for the dfu-util ticket at their support site.

As I mentioned earlier, dfu-util runs fine on the desktop. After all that is how I was able to get Arduino IDE 2.4 to upload the first sketch.

Yes, I do place the GIGA in bootloader mode and the green LED pulses. According to dfu-util documentation, when the board is in bootloader mode, it should respond to the following command:

dfu-util -l

but in my case no device list is displayed. The utility does not detect the GIGA. That is the reason why the flashing does not occur. I have used the dfu-util with and without the -w parameter and the output is consistent. With the parameter, the utility waits indefinitely. Without the parameter, it quickly declares that no board was detected.

I used the dfu-suffix utility to check the firmware and it confirmed that the file was correct (presumably for flashing). What other tests, if any, can I perform to confirm that the board is in bootloader mode?

There is very detailed output available by running the following command:

dfu-util -v -v -v

I sent the output to the **
dfu-util support 1.txt (9.0 KB)
** support team but presumably nobody examined the contents to provide feedback. My understanding of the contents of this file is non-existent.

My simplistic interpretation (and now extended from your feedback) and lack of further communication from the dfu-util team is that the board is indeed not in bootloader mode. But then why is the green LED pulsing? (BTW, I repeated these operations several times without progress).

There are many (+8) microcontroller boards connected to the desktop through the ACM and USB ports. Arduino IDE 2.4 uploads sketches to these boards without any issue. Of course, I had to use dfu-util for the initial UDEV rules processing before the sketches could be uploaded to the GIGA. I will now disconnect all the other boards simply to see at my end why the GIGA is not
being detected by dfu-util but I do not expect any further assistance from their support team. Perhaps the Arduino team can help me out with additional debugging steps to validate that the GIGA is indeed in bootloader (when the RESET button is double tapped). If there is a perceptible delay between the two taps then the green LED does not pulse. Therefore when the green LED does pulse, I am inclined to conclude that the board is indeed in bootloader mode. Unfortunately, that state is not detected by dfu-util. Thanks.

Regards.

P.S.
There are two additional paramters for dfu-util where I lack basic understanding:
-a
-D

I am using the value 0 for -a as illustrated earlier. I don't know what it means.
I cannot use -D since I don't have a clue on the device identifier other than 2341.
There has been no direct response from the dfu-util team on these questions.

Hello @ksoderby,

I disconnected all micro-controllers connected to the desktop via two hubs (one USB 2.0 and the other USB 3.0). Then I set the GIGA in bootloader mode and connected it to the desktop. And voila, the board was detected by the dfu-util utility. I will flash the firmware shortly and I do not expect any further roadblocks.

I don't understand what was preventing the utility program from detecting the GIGA in flash mode (when so many boards are present but none except the GIGA are in flash mode) but that is another topic for another day. Thanks for your help.

Regards.

Hello @ksoderby,

Just confirming that the flash operation with dfu-util worked successfully with zero warnings or errors as documented in the Arduino GIGA documentation:

Parsing element 1, address = 0x08040000, size = 1048560
Erase   	[=========================] 100%      1048560 bytes
Erase    done.
Download	[=========================] 100%      1048560 bytes
Download done.
Done parsing DfuSe file

In the performing the operation, I found the answers to my questions on the -a and -D parameters for the dfu-util program were staring at me through the output.

Always something new to learn!

Also, good insight to the partition of the storage from the detailed output of the following command:

$ dfu-util -l

Thanks again for all your help.

Regards.

Hey @baqwas , happy to see the success, and glad to be of any help! :slight_smile: