you can use openocd to debug, stlink seems to have some problem