cortex-debug: since version 4.5 it can't start debug

Hi, I am using ubuntu 20 and trying to start debugging my stm32f103 project using stlink 2.0. It used to work well, but since v 0.4.5 I get the error “Failed to start Openocd gdb server: Timeout”. To fix this problem, I reboot version 0.4.4 and it works fine. My config

           {
                "name": "stlink-v2",
                "request": "launch",
                "type": "cortex-debug",
                "cwd": "${workspaceRoot}",
                "servertype": "openocd",
                "executable": "${command:cmake.launchTargetPath}",
                "svdFile": "svd_file.svd",
                "configFiles": [
                    "/usr/share/openocd/scripts/interface/stlink-v2.cfg", 
                    "/usr/share/openocd/scripts/target/stm32f1x.cfg"
                ]
            },

It is bug or I a idiot?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

OpenOCD v0.10.0 is almost five years old. The “Listening on port %hu for %s connections” messages were added on Jan 13, 2018, this happened AFTER v0.10.0 was released (Jan 22, 2017), see https://review.openocd.org/c/openocd/+/4316 @ilia19911, please update the OpenOCD. Ideally, you should build it from sources. Since you are using Ubuntu, the process is straightforward.