Follow the instructions here https://github.com/stm32duino/wiki/wiki/Getting-Started nucleo-f031k6 unable to work properly