There are many pinout diagrams for the Blue Pill on the web, but the one above is the one I found most useful, originally from the os.mbed.com website. However, several of the board's pins have attached circuitry which limits how they can be used. This version of the diagram has all of these sketched in.
This version of the zip file has the complete code with all the examples.
blue-pill-bare-metal-blog5.zip |