I want to debug a Raspberry Pi Pico with another Raspberry Pi Pico but when I try to debug "hello_uart.elf", I receive the following output error:
Reading symbols from /usr/bin/arm-none-eabi-objdump --syms -C -h -w /home/usuario/pico/pico-examples/build/hello_world/usb/hello_usb.elf
Reading symbols from /usr/bin/arm-none-eabi-nm --defined-only -S -l -C -p /home/usuario/pico/pico-examples/build/hello_world/usb/hello_usb.elf
Launching GDB: /usr/bin/arm-none-eabi-gdb -q --interpreter=mi2 /home/usuario/pico/pico-examples/build/hello_world/usb/hello_usb.elf
Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
Launching gdb-server: openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s ~/pico/openocd/tcl -f /home/usuario/.vscode/extensions/marus25.cortex-debug-1.4.4/support/openocd-helpers.tcl -f interface/picoprobe.cfg -f target/rp2040.cfg
Please check TERMINAL tab (gdb-server) for output from openocd
Finished reading symbols from objdump: Time: 22 ms
Finished reading symbols from nm: Time: 32 ms
Reading symbols from /home/usuario/pico/pico-examples/build/hello_world/usb/hello_usb.elf...
OpenOCD GDB Server Quit Unexpectedly. See gdb-server output for more details.
LAUNCH.JSON:
{
"version": "0.2.0",
"configurations": [
{
"name": "Pico Debug",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
// This may need to be arm-none-eabi-gdb depending on your system
"gdbPath": "/usr/bin/arm-none-eabi-gdb",
"device": "RP2040",
"configFiles": [
"interface/picoprobe.cfg",
"target/rp2040.cfg"
],
"svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
"runToEntryPoint": "main",
// Work around for stopping at main on restart
"postRestartCommands": [
"break main",
"continue"
],
"searchDir": ["~/pico/openocd/tcl"],
}
]
}
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"
},
"build": {
"visibility": "hidden"
},
"buildTarget": {
"visibility": "hidden"
}
},
"cmake.buildBeforeRun": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
}
I have seen many posts but I still don't find which one is the one I need. Also, could it be possible that if I take out some blank-spaces from the end of the launch.json and/or the settings.json it can give me an error too?