These are my simple snippets for STM32 (compiled with libopencm3)
Be carefull: due to API changes these projects will compile only with opencm3 from archive libopencm3.ori.tgz

F0 - for STM32F042 and STM32F030
F1 - for STM32F103
F303 - for STM32F303

WARNING!!!
arm-none-eabi-gcc from gentoo have a bug with division on F0. 
Use toolchain from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads instead!

CMSIS-headers:
https://github.com/modm-io/cmsis-header-stm32