Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenOCD - Can't find target/swj-dp.tcl

I have troubles to use OpenOCD. For some reasons OpenOCD can't find swj-dp.tcl but the file is existing in 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

Error Message

Do you have any idea or advice for me? Thank you

like image 309
Drimer Avatar asked Nov 02 '25 18:11

Drimer


1 Answers

The problem arises from the fact that openocd configuration files are TCL scripts which include other scripts. And those included scripts are searched for only in provided search directories (IIRC, by default only current directory). So you need to provide additional search directories:

openocd -s C:\OpenOCD\share\openocd\scripts -f ...
like image 86
Kirill Dmitrenko Avatar answered Nov 05 '25 16:11

Kirill Dmitrenko