Skip to main content
m4l490n
Associate III
December 9, 2024
Solved

create custom USB DFU program using libusb instead of STM32CubeProgrammer?

  • December 9, 2024
  • 2 replies
  • 2123 views

Hello,

First I want to clarify that STM32CubeProgrammer is a very cool and useful software.

The purpose of my question is that in my company we need to integrate a "Firmware Flasher" into one of our Software products since we are not going to indicate our customers to download, install, and use STM32CubeProgrammer to update their device's firmware.

I was wondering if there is a sample project or code that uses libusb (preferably in C or C++), that I can use as a reference to develop a firmware flasher. I say ideally in C and C++ but if it is not in any of these languages that is ok. I can just translate it from whatever to C++ using ChatGPT.

Thanks!

Best answer by Tesla DeLorean

Try Github? Likely to be a place to find USB DFU code, ST or otherwise.

https://www.st.com/resource/en/application_note/an3156-usb-dfu-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

 

2 replies

m4l490n
m4l490nAuthor
Associate III
December 9, 2024

Duplicate thread merged.


Hello,

First I want to clarify that STM32CubeProgrammer is a very cool and useful software.

The purpose of my question is that in my company we need to integrate a "Firmware Flasher" into one of our Software products since we are not going to indicate our customers to download, install, and use STM32CubeProgrammer to update their device's firmware.

I was wondering if there is a sample project or code that uses libusb (preferably in C or C++), that I can use as a reference to develop a firmware flasher. I say ideally in C and C++ but if it is not in any of these languages that is ok. I can just translate it from whatever to C++ using ChatGPT.

Thanks!

Tesla DeLorean
Guru
December 9, 2024

Dupe  https://community.st.com/t5/stm32cubeprogrammer-mcus/is-there-an-example-of-how-to-use-libusb-to-create-a-custom-usb/td-p/752096

Perhaps you can find SW engineers with Windows, USB experience on places like Fiverr ?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
December 9, 2024
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
m4l490n
m4l490nAuthor
Associate III
December 9, 2024

@Tesla DeLorean 

Ok, I have heard about the USB DFU protocol before but I wasn't sure if the STM32 USB DFU implementation is just regular USB DFU or a custom version created by ST that they just called USB DFU.

I'll search for any USB DFU protocol examples. Thanks!

Pavel A.
Super User
December 9, 2024

The ST implementation also is known as "DfuSe".