The STM32 Bootloader
The STM32 Bootloader lives on all STM32 chips. The bootloader is used to load files (bootloaders and/or firmware) onto the chip.
These instructions apply to all STM32 chips with built in USB and DFU features.
Loading the GHI Bootloader v2
The bootloader often comes pre-installed on our devices. It only needs to be installed once. It does not need to be reinstalled unless it becomes erased or corrupted.
- Download and save the latest bootloader file.
- Download and install the DfuSe USB device firmware upgrade software from STMicroelectronics.
- Run the
DfuSeDemo
program installed in the previous step. It should appear in the programs menu underSTMicroelectronics
. - Put your board in DFU (Device Firmware Upgrade) mode. Instructions for putting your device in DFU mode are found on the documents page for the board you are using.
STM Device in DFU Mode
should now appear underAvailable DFU Devices
at the upper left of the DfuSe Demo program screen. - Near the bottom of the DfuSe Demo program window click on the
Choose...
button. Find the bootloader file you saved in step 1 (...Bootloader v2.x.x.dfu), click on it and click on theOpen
button. - Now click on the Upgrade button. Make sure you are using the "Upgrade" and not the "Upload" button. If a dialog box appears with
Your device was plugged in DFU mode...
click theYes
button. - You should see a message at the bottom of the DfuSe Demo window saying the upgrade was successful. Now reset the your device or click on the
Leave DFU mode
button. - Congratulations! You have successfully installed the GHI STM32 bootloader!
Creating a DFU file
Creating DFU files are not necessary for most users. This is only provided as a reference for advanced used.
You can create DFU files from .hex or .bin files using the DFU file manager software which is part of the DfuSe USB device firmware upgrade software download from step 2 of the above instructions.
The instructions are slightly different depending on whether you are starting with a .hex or .bin file.
From .hex files
- Find and open the "Dfu file manager" program. It should appear in the programs menu under
STMicroelectronics
. SelectI want to generate a DFU file
. - Click on the
S19 or Hex...
button to select the .hex file. - Click
Generate...
- You now have a DFU file!
From .bin files
- Find and open the "Dfu file manager" program. It should appear in the programs menu under
STMicroelectronics
. SelectI want to generate a DFU file
. - Click on
Multi BIN...
button to select the .bin file. - Change the address to 08000000
- Click on the
Add to list >>
button then click theOK
button. - Click
Generate...
- You now have a DFU file!