Page 4 of 4
Re: F411 (and F401) bootloaders
Posted: Sat Jan 14, 2023 3:23 pm
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
Re: F411 (and F401) bootloaders
Posted: Sun Jan 15, 2023 1:48 am
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.
Re: F411 (and F401) bootloaders
Posted: Sun Jan 15, 2023 5:09 am
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.
Re: F411 (and F401) bootloaders
Posted: Sun Jan 15, 2023 2:13 pm
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
Re: F411 (and F401) bootloaders
Posted: Mon Aug 21, 2023 10:50 pm
by darkmarvin2
dextream wrote: ↑Wed Sep 14, 2022 11:34 am
First option tried before working but still needs DFU Drivers, HID is much nicer. also used stlink but every project need to solder 4 pins for it and use wires. USB HID is much more practivcal I think and saves lot of time.
I might be some months late but I have good news
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
.
There is a github repo from Samveen
https://github.com/samveen/STM32_HID_Bo ... ree/merged that have a working HID bootloader for the Black pills, I tested with F411 and it works correctly, I can upload code via HID just as easily as with the Blue pill without pressing any button
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
. Well, the only problem is that this repo does not have the compiled binaries, so one needs to compile the bootloader by themselves. If you want, I can also upload the compiled binary.
I hope that this helps someone (I've searched for this bootloader since the start of 2022 and just found it now
![Laughing :lol:](./images/smilies/icon_lol.gif)
)