Can't find target/swj-dp.tcl ... and other issues


When running the ST-LINK debugger on Win 10, it complains a file is missing, while being there

I had to update the launch file and I also tried adding -s directives but it does not seem to work

"configFiles": [
      "cwd": "${workspaceFolder}",
      "debuggerArgs": [

it first says build_all_debug returned exit code 2, I click on Debug anyway

Waiting for gdb server to start...[2024-03-07T19:31:38.690Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "W:\\**********\\PhilDaisySeed" -f "c:/Users/phil/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f ./ocd/interface/stlink.cfg -f ./ocd/target/stm32h7x.cfg -c init -c "reset init"
xPack Open On-Chip Debugger 0.12.0+dev-01312-g18281b0c4-dirty (2023-09-04-22:32)
Licensed under GNU GPL v2
For bug reports, read
./ocd/target/stm32h7x.cfg:8: Error: Can't find target/swj-dp.tcl
in procedure 'script' 
at file "embedded:startup.tcl", line 28
at file "./ocd/target/stm32h7x.cfg", line 8
[2024-03-07T19:31:39.033Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

so I had to modify stm32h7x.cfg as a workaround, but I have the feeling I don’t do things right

  • if anyone is doing something similar on windows, let me know how to do this properly

  • if I mod the code and press F5, it does not rebuild anything, giving me :
    make: Nothing to be done for ‘all’.

  • is there a compile flag to remove optimization, at least for some variables ?

here is how I have setup my project Windows 10 - JTAG - Error: open failed - Troubleshooting and Support - Daisy Forums (

any help appreciated