Your question is one I was recently interested in as I too have begun using Blue/Black Pills, and I am still learning!
Have you got your Arduino IDE set up, and have you added the plugin for the STM32 boards? If not then you can find a tutorial in many places on the internet, one example being on youtube, if you prefer video tutorials...
https://www.youtube.com/watch?v=b1123kz_3MM
Some are better than others and I prefer a written instruction, with or without pics!
Essentially you have to add:-
https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
to your list or boards in the preferences. Many Tutorials will explain in detail.
Programming options include:
- STLink-v2.1 etc. The STLink-v2.1 is easy to source, cheap, and after it is eventually replaced by something else you can even repurpose it as if it is a STM32 USB stick!
- FTDI USB to TTL breakout adapter, 3.3v only, connected to the SWD pins on the opposite end to the USB socket.
- An Arduino board acting as a TTL/SWD adapter but already kind (talking) to Arduino!
- Burning an STM32-Arduino boot-loader onto the blue/black pill, and plug it in like an Arduino, using tutorials.
- Install STM32CubeProg, on your host computer, which is free and a very good IDE.
- NO DOUBT a search engine (of traditional values!) can find other options including JTAG, JLink, Bus-Pirate, etc. (Avoid search engines that send you straight to selling sites!)
All of these need to be searched, read and understood before a logical choice is made, but all of them are usable choices. Every reader will know that you will get user advice insisting that you do what they have done, or worse, warning you to avoid methods that others have used successfully. Caveat Emptor!
Follow the easiest path to begin with, one of those that are given in the Arduino site perhaps, and investigate others when you have found what you want the process to do, and which process suits your methods and budget. Much depends on memory needs and applications.