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