joe@joe-PC /cygdrive/g/dapjtag/openocd-20200729/OpenOCD-20200729-0.10.0/share/openocd/scripts
$ openocd -f ./board/st_nucleo_f103rb.cfg
Open On-Chip Debugger 0.10.0 (2020-07-29) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : STLINK V2J27M15 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.240394
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444
能链上板子了。
joe@joe-PC /cygdrive/g/dapjtag/openocd-20200729/OpenOCD-20200729-0.10.0/share/openocd/scripts
$ openocd -f ./board/st_nucleo_f103rb.cfg -c "program e:/temp/stm32USBVPCdemo/C8t6usbvpc/MDK-ARM/C8t6usbvpc/C8t6usbvpc.bin verify exit"
出现:
Open On-Chip Debugger 0.10.0 (2020-07-29) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 1000 kHz
Info : STLINK V2J27M15 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.237246
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: timed out while waiting for target halted
** Unable to reset target **
shutdown command invoked
板子确实没有烧程序进去(实验发现串口没有显示信息出来,如果用jlink将同一份bin烧进去则串口能有显示)
来源:oschina
链接:https://my.oschina.net/u/2963604/blog/4709518