Learn how to burn (flash) the bootloader on GIGA R1 WiFi.
In this article:
- Prepare your GIGA R1 WiFi for bootloader flashing
- Flash the bootloader with dfu-util (recommended)
- Flash the bootloader with STM32CubeProgrammer
- Troubleshooting
Prepare your GIGA R1 WiFi for bootloader flashing
To burn the bootloader on GIGA R1 WiFi, it needs to be connected in DFU mode:
-
Connect your GIGA R1 WiFi to your computer using a USB cable.
-
Find the two push buttons labeled BOOT0 and RST on the board:
-
Press and hold BOOT0 button.
-
Keep the BOOT0 button pressed down, and press the RST button once.
-
Release both buttons. GIGA R1 WiFi will briefly disconnect and reconnect to your computer.
Flash the bootloader with dfu-util (recommended)
If you’ve installed the Arduino Mbed OS Giga Boards package on your computer using the Boards Manager in Arduino IDE or Arduino CLI, you can use the included dfu-util tool to flash the bootloader on your GIGA R1 WiFi board.
Windows
-
Open Command Prompt by right-clicking in the bottom-left corner of the screen and selecting Command Prompt, or by searching for “cmd” in the taskbar.
-
Copy this command:
"%LOCALAPPDATA%\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5\dfu-util" --device ,0x0483:0xdf11 -D "%LOCALAPPDATA%\Arduino15\packages\arduino\hardware\mbed_giga\4.0.6\bootloaders\GIGA\bootloader.bin" -a0 --dfuse-address=0x8000000
-
If neccessary, modify the package version number (4.0.6) to whichever is installed.
-
Right-click inside the Command Prompt window to paste the command, then press Enter to begin flashing the bootloader.
Note
To use Powershell instead of Command Prompt, copy this command instead:
&"$Env:LOCALAPPDATA\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5\dfu-util" --device ,0x0483:0xdf11 -D "$Env:LOCALAPPDATA\Arduino15\packages\arduino\hardware\mbed_giga\4.0.6\bootloaders\GIGA\bootloader.bin" -a0 --dfuse-address=0x8000000
macOS
-
Open Terminal. You can find it with Spotlight by pressing ⌘ + Space and typing “Terminal”.
-
Copy this command:
~/Library/Arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util --device ,0x0483:0xdf11 -D ~/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.0.6/bootloaders/GIGA/bootloader.bin -a0 --dfuse-address=0x8000000
-
If neccessary, modify the package version number (4.0.6) to whichever is installed.
-
Select the Terminal window and press ⌘ + V to paste the command, then press Enter to begin flashing the bootloader.
Linux
-
Open your computer’s command line application (often referred to as shell, terminal, console, prompt or various other names). Look for it in your launcher, or try the Ctrl + Alt + T keyboard shortcut (available on most Linux systems).
-
Copy this command:
~/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util --device ,0x0483:0xdf11 -D ~/.arduino15/packages/arduino/hardware/mbed_giga/4.0.6/bootloaders/GIGA/bootloader.bin -a0 --dfuse-address=0x8000000
-
If neccessary, modify the package version number (4.0.6) to whichever is installed.
-
Select the Terminal window and press Ctrl + ⇧Shift + V to paste the command, then press Enter to begin flashing the bootloader.
Flash the bootloader with STM32CubeProgrammer
If you prefer to use a graphical interface, you can use STM32CubeProgrammer.
Note
To use STM32CubeProgrammer on macOS, you may need to run the executable directly: Right-click the .app
container and select Show package contents, then navigate into Contents/MacOs
. Double-click the file SetupSTM32CubeProgrammer-X_Y_Z_macos
executable.
-
Open STM32CubeProgrammer and click on Open file.
-
Select the bootloader from one of the following locations:
-
Download the bootloader file and select it from your default download location.
-
If you’ve installed the Arduino Mbed OS Giga Boards package, you can also find it inside your Arduino15 folder.
-
Windows:
C:\Users\{username}\AppData\Local\Arduino15\packages/arduino/hardware/mbed_giga/4.0.6/bootloaders/GIGA/bootloader.elf
-
macOS:
~/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.0.6/bootloaders/GIGA/bootloader.elf
-
Linux:
~/.arduino15/Arduino15/packages/arduino/hardware/mbed_giga/4.0.6/bootloaders/GIGA/bootloader.elf
-
-
-
If you get a “Warning: File corrupted. Two or more segments defines the same memory zone” message, ignore it.
-
Set the programmer selection (default: ST-LINK) to USB.
-
For the Port selection, select your board. To refresh the list, click the update button.
-
Click on Connect button. The connection status should change from “Not connected” to “Connected”.
-
Click on the Download button. If you get another warning message, close it by selecting OK.
Note
Click on the left part of the button where it says “Download” (not the arrow, which opens a context menu)
-
The message “File download complete” will appear as a pop-up notification when the download is complete.
-
Disconnect and reconnect GIGA R1 WiFi to your computer.
Troubleshooting
dfu-util: No DFU capable USB device available
If you see this error, make sure you’ve followed the steps in Prepare your GIGA R1 WiFI for bootloader flashing.
Cannot open DFU device 0483:df11 found on devnum 2 (LIBUSB_ERROR_NOT_SUPPORTED)
If you see this error on Windows, you may be missing the correct driver.
Follow these steps:
-
Open Device Manager and locate the DFU in FS Mode device under Other devices.
- If you can’t find it, try selecting View > Show hidden devices.
- If a different device appears, such as STM device in DFU Mode (under Universal Serial Bus controller), right-click and select Uninstall device.
-
Right-click on the DFU in FS Mode device and select Update driver… / Update driver software… from the context menu.
-
In the wizard, select Browse my computer for driver software.
-
Select Let me pick from a list of device drivers on my computer.
-
From the list of device classes, select Universal Serial Bus devices. If you don’t see it, untick Show compatible hardware.
-
Select WinUsb Device > WinUsb Device.
-
Click Next.
-
Confirm that you want to install the driver.
After installing the driver, try flashing the bootloader with dfu-util again.