From https://www.purplealienplanet.com/node/69 and the templates and examples in the STM32CubeF1 package documentation.
git clone https://github.com/Seveen/stm32-minimal-f1.git
cd stm32-minimal-f1
You need the STM32CubeF1 soft package from ST https://www.st.com/en/embedded-software/stm32cubef1.html *Copy Drivers directory from ST soft package to ./Drivers
cd Drivers/
make
make
st-flash --reset write project.bin 0x08000000