Programming STM32 Blue Pill using Arduino software.

See: How to program a STM32 \u201cBlue Pill\u201d with Arduino

This method doesn't need a bootloader installed. As far as I understand the bootloader is uploaded into sram before doing the actual program upload.

Note: If a bootloader was programmed in the STM32 then this will be overwritten!

Note: The blink example as suggested in this article may give a problem bug. In my version, the pin name connected to the LED is referred to as '13':

pinMode(13, OUTPUT);

However, this doesn't work; changing it into:

pinMode(PC13, OUTPUT);

solves the problem. Same for 2 more lines in the loop.


Openocd

Another way to talk with the Blue Pill is using openocd. See:

Programming an STM32F103XXX with a generic "ST Link V2" programmer from Linux

This needs:

In Linux:
  openocd -f stlink-v2.cfg -f stm32f1x.cfg
Then, in another shell:
telnet localhost 4444
This gives a promp where you can type commands. E.g. to download an earlier uploaded program:
> dump_image dump.bin 0x08000000 0x1ffff