Page 1 of 1

STM32F dev board programming via DFU USB bootloader

Posted: Thu Feb 27, 2025 4:41 pm
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 305 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 340 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 :)

Re: STM32F dev board programming via DFU USB bootloader

Posted: Fri Feb 28, 2025 11:57 am
by BenR
Amazing work thanks Leigh hope all is well.

Those files have now been added in much appreciated :D

Re: STM32F dev board programming via DFU USB bootloader

Posted: Sat May 16, 2026 5:55 am
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

Re: STM32F dev board programming via DFU USB bootloader

Posted: Sat May 16, 2026 12:09 pm
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.