cancel
Showing results for 
Search instead for 
Did you mean: 

How to do USB DFU from a custom MS visual studio application?

Rodo
Senior

Hi all,

I'm investigating what I need to be able to update the firmware on my custom STM32 board (with either an STM32H7 or STM32F7 MCU) from a C#/C++ Microsoft Visual studio application via USB. This is for Windows 7/10/11.


I found STSW-STM32080 but it says not recommended for new designs and that it was replaced by STM32CubeProgrammer (CLI specifically). I want my application to do the upgrading of the firmware without the customer having to install any additional software (like STM32CubeProgrammer).

Does STM32CubeProgrammer have any redistributable libraries to do this? Is there a better way to do this?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> Does STM32CubeProgrammer have any redistributable libraries to do this? Is there a better way to do this?

A few options:

  • STM32CubeProgrammer has a C++ API you can use. See the STM32CubeProgrammer/api/doc folder for documentation.
  • You could make your own bootloader and use whatever protocol you like.
  • You could make your own DFU code.
If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

> Does STM32CubeProgrammer have any redistributable libraries to do this? Is there a better way to do this?

A few options:

  • STM32CubeProgrammer has a C++ API you can use. See the STM32CubeProgrammer/api/doc folder for documentation.
  • You could make your own bootloader and use whatever protocol you like.
  • You could make your own DFU code.
If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

But note that the STM32CubeProgrammer API DLL has dependency on Qt.5 redistributable DLLs, further redistribution rights on these are not clear.