3

我在使用 OpenOCD 时遇到了麻烦。由于某些原因,OpenOCD找不到 swj-dp.tcl,但该文件存在于 C:\OpenOCD\share\openocd\scripts\target 中。

Open On-Chip Debugger 0.9.0 (2015-08-15-12:41)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
C:\OpenOCD\share\openocd\scripts\target\stm32f1x.cfg:6: Error: Can't find target/swj-dp.tcl
in procedure 'script' 
at file "embedded:startup.tcl", line 60
at file "C:\OpenOCD\share\openocd\scripts\target\stm32f1x.cfg", line 6

错误信息

你对我有什么想法或建议吗?谢谢

4

1 回答 1

6

问题在于openocd配置文件是包含其他脚本的 TCL 脚本。并且仅在提供的搜索目录(IIRC,默认情况下仅当前目录)中搜索那些包含的脚本。所以需要提供额外的搜索目录:

openocd -s C:\OpenOCD\share\openocd\scripts -f ...
于 2016-09-08T11:52:51.553 回答