首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >找不到arm GDB可执行文件“OpenOCD -none-eabi-gdb”。请正确配置cortex debug.armToolchainPath

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

Stack Overflow用户
提问于 2021-01-24 23:04:24
回答 1查看 1.4K关注 0票数 1

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

OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly.

我为launch.json提供了以下配置

代码语言:javascript
运行
复制
{
    "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的代码

代码语言:javascript
运行
复制
{
    // 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
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-17 19:45:55

文档中最近有一个修复。

如此链接所述:https://github.com/raspberrypi/pico-examples/issues/8

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

忽略启动设置,使用arm-none-eabi-gdb时,在launch.json中设置gdbpath被标记为不允许,该选项不可用。似乎只能在settings.json中设置cortex DEBUG.gdbpath

所以去掉吧。

"gdbpath“:在launch.json中添加"gdb-multiarch”,并在settings.json中添加“cortex debug.gdbpath”:"gdb-multiarch“。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65872178

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档