Hello!
I am use Debian Linux 11 with VS Code and PlatformIO plugin (Core 5.2.5, Home 3.4.1).
My devices: STM32F103C8T6 (Chinese clone) with ST-Link v.2
I am configure project for board “Blue Pill F103C8”.
For this board working, i append to platformio.ini next lines:
; Upload by stlink utility
upload_protocol = stlink
upload_flags = -c set CPUTAPID 0x2ba01477
; Setup debug server for China clone of STM32F103
debug_tool = stlink
debug_server =
openocd
-s /usr/share/openocd/scripts
-f interface\stlink.cfg
-c "transport select hla_swd"
-c "set CPUTAPID 0x2ba01477"
-f target\stm32f1x.cfg
-c "reset_config none"
board_debug.openocd_extra_args =
-c "set CPUTAPID 0x2ba01477"
The Build and Run is work nice. Led blink sample uploading and work. But if push to Debug, i see an error message:
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:26: Error: Can't find interfacestlink.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
.pioinit:13: Error in sourced command file:
Remote communication error. Target disconnected.
How to fix this trouble? Why it’s can’t find interfacestlink.cfg?
I am trying delete ~/.platformio/packages/tool-openocd, restart VS Code and wait for download this tool, and rebuild and debug again, as it recommendet at this page: Error when uploading to a STM-32 103RB board, but this action don’t fix this problem.