to keep things simple / short and sweet.
I'd assume you have figured out how to install a sketch/firmware using the usb serial dongle (e.g ft232, ft2232 etc).
that method can be used on both stm32f1 and stm32f4. just that for stm32f4 there is the additional 'usb dfu upload' i.e. after you set boot0.
press reset you can actually upload a sketch to it using usb-dfu. read up more from the links ray suggest and st's wab
https://www.st.com/resource/en/applicat ... ronics.pdf
https://www.st.com/resource/en/applicat ... ronics.pdf
https://learn.adafruit.com/adafruit-stm ... er-details
and for this you only need a usb-cable to upload firmware / sketch
now for serial.
for libmaple (roger's and steve's (f4) core), usb-serial is default
so Serial.println("hello world"); goes to your serial monitor
for the official STM core you'd only need to choose USB Serial (CDC) and you have the same thing
Serial.print("hello world"); goes to your serial monitor
-----------
boot loader - that is a *much* longer story
in the beginning genisis, it started here
https://www.leaflabs.com/maple
http://docs.leaflabs.com/static.leaflab ... dex-2.html
http://docs.leaflabs.com/static.leaflab ... oader.html
then roger as an individual started a forum with this as the domain hosted the core on github
https://github.com/rogerclarkmelbourne/Arduino_STM32
roger and this community improved on the core
and roger improved on the bootloader as well
https://github.com/rogerclarkmelbourne/ ... Bootloader
https://github.com/rogerclarkmelbourne/ ... bootloader
then some other enterprising individuals created this one
https://github.com/Serasidis/STM32_HID_Bootloader
and somewhere along the way came the official STM core
https://github.com/stm32duino/Arduino_Core_STM32
it is an interesting little history
the usb (dfu) bootloader is mainly for the stm32f103 it makes it a little more convenient as all you need is a usb-cable to upload the sketch
no additional usb-uart dongles needed
otherwise using a usb-uart dongle or st-link v2 dongle is a bullet proof way to install firmware / sketch on stm32 devices.
it is supported by the hardware internally and is the recommended de-facto method
----
if you happen to be using roger's libmaple core, there is this little sketch deep inside the examples
that makes the stm32f103 pill board a usb-uart dongle
https://github.com/rogerclarkmelbourne/ ... -w-signals
so that can then be used as another usb-uart dongle to interface/program other stm32s, other mcus etc
the notion is if you have a board with roger's bootloader, installed on at least a pill board.
and you misplaced your usb-uart, now you have a 'software' solution to get a usb-uart
this sounds a little like reprap, having a little stm32duino pill, it'd make another one
https://reprap.org/wiki/RepRap
btw that isn't even an illusion
https://www.aliexpress.com/item/4001039599237.html
https://all3dp.com/4/marlin-releases-st ... -firmware/
https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3