How to flash a Blue Pill with an ST-Link?

It immediately said I needed a firmware update. (For some reason it would not let me take a screenshot of this dialog box, so I had to use a camera.)

I tried that. It told me the firmware version was unknown:

I clicked the “Open in update mode” button. This printed out a couple of lines on standard output:

JNI command error 0x1001 after cmd [-15, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
JNI command error 0x1001 after cmd [-15, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

And then it displayed an error message at the bottom of the GUI:

So it looks like my ST-Link probe is no good.

Can we focus on the CMSIS-DAP probe instead? I know it works in general. Shouldn’t it have worked to upload this program to the Blue Pill? What can I do to investigate why the CMSIS-DAP probe isn’t working?