未找到 OpenOCD GDB 可执行"arm-none-eabi-gdb"。请正确配置"cortex-debug.armToolchainPath"



我正在使用树莓派Pico,并试图在树莓派4上使用VSCode中的VSCode调试工具,但我得到以下错误:

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

我有以下配置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
}

最近在文档中有一个修复。

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

按照入门指南中的描述设置树莓派时,启动调试器时会出现两个问题:

设置"gdbpath"在发射。Json被标记为不允许在启动时,忽略该设置,并使用arm-none-eabi-gdb,这是不可用的似乎设置"cortex-debug.gdbpath"只能在settings.json

中设置删除。

"gdbpath":";gdb-multiarch"从发射。并添加"cortex-debug.gdbPath"; "settings.json。

相关内容

  • 没有找到相关文章

最新更新