Visual studio code OpenOCD GDB可执行文件;arm none eabi gdb“;找不到。请配置";cortex debug.armToolchainPath“;正确地

Visual studio code OpenOCD GDB可执行文件;arm none eabi gdb“;找不到。请配置";cortex debug.armToolchainPath“;正确地,visual-studio-code,raspberry-pi,Visual Studio Code,Raspberry Pi,我正在使用Raspberry Pico,并试图在Raspberry Pi 4上的VSCode中的VS代码中使用调试工具,但出现以下错误: 未找到OpenOCD GDB可执行文件“arm none eabi GDB”。请正确配置“cortex debug.armToolchainPath”。 我对launch.json有以下配置 { "version": "0.2.0", "configurations": [

我正在使用Raspberry Pico,并试图在Raspberry Pi 4上的VSCode中的VS代码中使用调试工具,但出现以下错误:

未找到OpenOCD GDB可执行文件“arm none eabi GDB”。请正确配置“cortex debug.armToolchainPath”。

我对launch.json有以下配置

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "TempSensor",
            "cwd": "${workspaceRoot}",
            "executable": "/home/pi/pico/devices/build/tempSensor/tempSensor.elf",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            // This may need to be arm-none-eabi-gdb depending on your system
            "gdbpath": "gdb-multiarch",
            "device": "RP2040",
            "configFiles": [
                "interface/raspberrypi-swd.cfg",
                "target/rp2040.cfg"
            ],
            "svdFile": "/home/pi/pico/pico-sdk/src/rp2040/hardware_regs/rp2040.svd",
            "runToMain": true,
            // Work around for stopping at main on restart
            "postRestartCommands": [
                "break main",
                "continue"
            ]
        }
    ]
}
下面是settings.json的代码

{
    // These settings tweaks to the cmake plugin will ensure
    // that you debug using cortex-debug instead of trying to launch
    // a Pico binary on the host
    "cmake.statusbar.advanced": {
        "debug": {
            "visibility": "hidden"
        },
        "launch": {
            "visibility": "hidden"
        }
    },
    "cmake.buildBeforeRun": true,
    "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
    "cmake.configureOnOpen": false
}

文档中最近有一个修复程序

如本链接所述:

按照《入门指南》中的说明设置Raspberry Pi时,启动调试器时会出现两个问题:

在launch.json中设置“gdbpath”被标记为不允许 启动时,将忽略设置,并使用arm none eabi gdb,这是不可用的 似乎只能在settings.json中设置“cortex debug.gdbpath”

{
    // These settings tweaks to the cmake plugin will ensure
    // that you debug using cortex-debug instead of trying to launch
    // a Pico binary on the host
    "cmake.statusbar.advanced": {
        "debug": {
            "visibility": "hidden"
        },
        "launch": {
            "visibility": "hidden"
        }
    },
    "cmake.buildBeforeRun": true,
    "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
    "cmake.configureOnOpen": false
}
因此,请删除


“gdbpath”:“gdb multiarch”来自launch.json,并将“cortex debug.gdbpath”:“gdb multiarch”添加到settings.json。

也存在此问题。你把它修好了吗?我是遵循C++ SDK指南的。()并按照第2章的说明进行操作,然后转到第6章。我相信我已经完成了它要求的一切。我甚至已经正确安装了
gdb-multiarch
,正如您上面所示,这就是
.vscode/launch.json
文件中的内容,但在其他地方,它要求使用
arm非eabi-gdb
可执行文件,即使配置文件说明了一些不同的内容。可能是因为
cortex调试
类型?那应该是什么!?(我可能应该提到,我在英特尔x86_64芯片上使用的是Pop_OS 20.10——我必须做一些小的编辑,比如从我的软件包管理器安装VSCode,并在
pico_setup.sh
安装程序中设置
SKIP_VSCode=1
,因为我不在Pi上。)是的。看下面!我错过什么了吗?下面没有内容。请重试,我的原始答案已被版主删除。