Simplifying Concepts.
Accelerating Innovation.

Jacob's Blog

Jacob Beningo
| |

Tools – The Device Firmware Update (DFU) Utility

Nearly every product requires a software update at some point or another. Whether it’s our cellphones, TV’s or even our refrigerators (yea I went there). Microcontroller based systems typically aren’t running a high-level operating system that allows files to be replaced. Instead, developers need a bootloader. Microcontroller vendors have been including firmware update capabilities inside their silicon for quite some time. In this post, I’m going to talk about the DFU Utility which can be used to update STM32 microcontrollers (along with a select few other microcontrollers). I have found this utility to be very useful when modifying and deploying updates to the Micro Python kernel.

STM32 microcontrollers include a firmware update application built into the ROM. Developers can gain access to the utility by pulling BOOT0 high during the boot process. At that point, the microcontroller will be ready to accept new application code.

After building their application code in GCC or any number of STM32 compilers, developers will discover that in addition to a .hex file, a .dfu file is also generated. The .dfu file contains the application code along with checksums and information required to properly load the application into flash.

Developers who are running Linux, will need to install dfu-util. Developers who are running Windows can download dfu-util from the ST Microelectronics website at (http://www.st.com/en/development-tools/stsw-stm32080.html) or developers can download the open source version as well. Once the utility has been downloaded, running the application will result in the following screen being displayed:

The utility will automatically detect when a device in the bootloader mode has been connected to the PC via USB. If multiple devices have been selected, the dropdown can be used to select the desired device. On the upper right, information about the microcontroller is displayed.

Developers can update firmware using the Update or Verify Action section. Select choose, then use the pop-up to select the new application dfu file. Finally, press the upgrade button and the firmware update will begin. The transfer data size section will display how far along the firmware update is. Once it completes, the firmware update process is complete! Simply select the “Leave DFU mode” button (after removing power from BOOT0).

Easy and mostly painless firmware update over USB!

* * *

Struggling to keep your development skills up to date or facing outdated processes that slow down your team, raise costs, and impact product quality?

Here are 4 ways I can help you:

  • Embedded Software Academy: Enhance your skills, streamline your processes, and elevate your architecture. Join my academy for on-demand, hands-on workshops and cutting-edge development resources designed to transform your career and keep you ahead of the curve.
  • Consulting Services: Get personalized, expert guidance to streamline your development processes, boost efficiency, and achieve your project goals faster. Partner with us to unlock your team's full potential and drive innovation, ensuring your projects success.
  • Team Training and Development: Empower your team with the latest best practices in embedded software. Our expert-led training sessions will equip your team with the skills and knowledge to excel, innovate, and drive your projects to success.
  • Customized Design Solutions: Get design and development assistance to enhance efficiency, ensure robust testing, and streamline your development pipeline, driving your projects success.

Take action today to upgrade your skills, optimize your team, and achieve success.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.