F411 (and F401) bootloaders

GonzoG
Posts: 372
Joined: Wed Jan 15, 2020 11:30 am
Answers: 24
Location: Prudnik, Poland

Re: F411 (and F401) bootloaders

Post by GonzoG »

@r1s8k
1. WeAct bootloaders for F401 and F411 do not work with Arduino IDE and STM32duino.
2. You can easily download them from their github page
r1s8k
Posts: 10
Joined: Tue Mar 10, 2020 7:14 pm
Answers: 1

Re: F411 (and F401) bootloaders

Post by r1s8k »

GonzoG wrote: Sat Jan 14, 2023 3:23 pm 1. WeAct bootloaders for F401 and F411 do not work with Arduino IDE and STM32duino.
But the first time I connected the board to Arduino IDE, it programmed with SWD with no issues. But after I programmed it with STM32CubeProgrammer I can't program it with Arduino anymore.
2. You can easily download them from their github page
How ? I tried but things are really complicated and the steps aren't clear. Can you help me please ?

I can only program the board with STM32CubeProgrammer by pressing NRST and then select connect, that way I can upload the program binary.
ag123
Posts: 1492
Joined: Thu Dec 19, 2019 5:30 am
Answers: 20

Re: F411 (and F401) bootloaders

Post by ag123 »

F401 (F411) doesn't need 'additional' boot loaders.
you could try using DFU
connect usb
button sequence
- press both reset and boot0
- release reset hold boot0
- release boot0 1 sec later
then use STM32CubeProgrammer to program your sketch

alternatively, if you have st-link v2
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
connect the wires
and similarly use STM32CubeProgrammer flash away.

I think it is already integrated with Arduino IDE, so you can directly click the download button if you'd like.

Allternatively, from the arduino ide, go to Sketch > Export compiled Binary.
The bin file should be in your sketch folder.
then you can flash that bin file using STM32CubeProgrammer manually.
GonzoG
Posts: 372
Joined: Wed Jan 15, 2020 11:30 am
Answers: 24
Location: Prudnik, Poland

Re: F411 (and F401) bootloaders

Post by GonzoG »

r1s8k wrote: Sun Jan 15, 2023 1:48 am But the first time I connected the board to Arduino IDE, it programmed with SWD with no issues. But after I programmed it with STM32CubeProgrammer I can't program it with Arduino anymore.
You can still use ST-Link to program F4x1. Even in Arduino IDE and it does not require manual board reset.
r1s8k wrote: Sun Jan 15, 2023 1:48 am How ? I tried but things are really complicated and the steps aren't clear. Can you help me please ?

I can only program the board with STM32CubeProgrammer by pressing NRST and then select connect, that way I can upload the program binary.
https://github.com/WeActStudio
https://github.com/WeActStudio/WeActStu ... Bootloader
But those won't work with Arduino IDE. F4x1 bootloader is based on old HID bootloader 1.0 that isn't supported in Arduino IDE. You would have to build your own based on newer 2.2 version

If you want to program board using USB with you the need to manually reset MCU into DFU mode, you need HID bootloader.
There is one made for F411: https://github.com/Serasidis/STM32_HID_ ... -670308140
But for F401 you'll need to build one yourself: https://github.com/Serasidis/STM32_HID_Bootloader
Post Reply

Return to “STM32F4 based boards”