cancel
Showing results for 
Search instead for 
Did you mean: 

create custom USB DFU program using libusb instead of STM32CubeProgrammer?

m4l490n
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
m4l490n
Associate III

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!

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

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

@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!

The ST implementation also is known as "DfuSe".