WARN src/stlink-common.c: unknow
使用stlink v2的时候产生了如下的警告,无法启动gdb_server,正常的信息如下:
chen@chen-Aspire-4745G:~$ st-util 2016-11-20T10:05:53 INFO src/stlink-usb.c: bus 002 dev 036 2016-11-20T10:05:53 INFO src/stlink-usb.c: -- exit_dfu_mode 2016-11-20T10:05:53 INFO src/stlink-common.c: Loading device parameters.... 2016-11-20T10:05:53 INFO src/stlink-common.c: Device connected is: F1 Medium-density device, id 0x20036410 2016-11-20T10:05:53 INFO src/stlink-common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 1024 bytes 2016-11-20T10:05:53 INFO gdbserver/gdb-server.c: Chip ID is 00000410, Core ID is 1ba01477. 2016-11-20T10:05:53 INFO gdbserver/gdb-server.c: Target voltage is 3210 mV. 2016-11-20T10:05:53 INFO gdbserver/gdb-server.c: Listening at *:4242...
出问题的信息如下:
chen@chen-Aspire-4745G:~$ st-util 2016-11-20T10:02:24 INFO src/stlink-usb.c: bus 002 dev 035 2016-11-20T10:02:24 INFO src/stlink-common.c: Loading device parameters.... 2016-11-20T10:02:24 WARN src/stlink-common.c: unknown chip id! 0xe0042000
解决方法:
- Short the BOOT0 pin with VDD
- Reset the board
- st-flash erase
解决方法来自这里
我的需要重新插拔stlink的USB线。