Debugging OpenOCD-Can';t查找目标/swj-dp.tcl

Debugging OpenOCD-Can';t查找目标/swj-dp.tcl,debugging,stm32,openocd,Debugging,Stm32,Openocd,我很难使用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\ope

我很难使用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


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

这个问题是因为
openocd
配置文件是包含其他脚本的TCL脚本。这些包含的脚本只在提供的搜索目录(IIRC,默认情况下仅在当前目录)中搜索。因此,您需要提供其他搜索目录:

openocd -s C:\OpenOCD\share\openocd\scripts -f ...

在文本中包含错误消息:)我与OP有相同的问题,即使使用-s标志和脚本文件夹的正确路径,问题仍然存在。还有什么我可以试试的吗?@SimonCarlson你能把你的错误信息移植到某个地方吗?我在这里发布了一个问题: