STM32F dev board programming via DFU USB bootloader

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.
Post Reply
LeighM
Valued Contributor
Posts: 543
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 100 times
Been thanked: 299 times

STM32F dev board programming via DFU USB bootloader

Post by LeighM »

I found a little time to play with STM32F DFU programming via the USB bootloader, this avoids needing the ST-link programmer.
This has been tested with a WeAct STM32F411CE 8MHz Black Pill dev board.

First install the STM32CubeProgrammer from www.st.com (at default location)

Here's an FCD with modified programming stage 32F411CE_BlackPill.fcdx
to go into directory C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ARM
32F411CE_BlackPill.fcdx
(46.02 KiB) Downloaded 301 times

And an additional batch program stm32progDFU.bat
to go into directory C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ARM\batch
stm32progDFU.bat.txt
(829 Bytes) Downloaded 334 times
Connect the dev board via USB cable to the PC running Flowcode.
Hold the BOOT0 button and press and release the RST button.
The dev board is now in programming mode.
Compile to Target with Flowcode.
Press RST button to run the newly updated program.

Note to Matrix: feel free to re-distribute these via the repo if you so wish :)

BenR
Matrix Staff
Posts: 2204
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 603 times
Been thanked: 800 times

Re: STM32F dev board programming via DFU USB bootloader

Post by BenR »

Amazing work thanks Leigh hope all is well.

Those files have now been added in much appreciated :D

abhiak096
Posts: 1
Joined: Tue Mar 10, 2026 10:21 am

Re: STM32F dev board programming via DFU USB bootloader

Post by abhiak096 »

what if i want to use this method on stm32f407vet6 microcontroller should i do the same , or anything else or is it even possible from flow code to upload code via bootloader method ?

plz help

LeighM
Valued Contributor
Posts: 543
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 100 times
Been thanked: 299 times

Re: STM32F dev board programming via DFU USB bootloader

Post by LeighM »

You could use the output of the Flowcode "Compile to Hex" and use the GUI version of STM32CubeProgrammer.

Your hardware would need to have USB and Boot0 switch implemented.

Post Reply