dependencies: arm-none-eabi-gcc arm-none-eabi-newlib stlink ChibiOS\RT
arm-none-eabi-gcc arm-none-eabi-newlib stlink
for example from here: https://github.com/ChibiOS/ChibiOS
"CHIBIOSFOLDER"/demos/STM32/
make # for compilation;
make install # for flashing to device
your steps: download this and flash.
if you see the leds blinking and their light is running clockwise, thats allright with driver, if you see only two red leds alight, this means kernel panic, if you see kernel panic, LET ME KNOW about that. Connect uart to PA13, PA14 pins;(baud is 115200), and see results, gyroscope axis info.