Copy from https://github.com/kersny/chibios-stm32f3discovery.