Raspberry Pi Pico を C/C++ でソースコードデバッグしたい。そのために、Seeed XIAO RP2040をPicoProbeにしてVS Code に設定を施す。
Seeed XIAO RP2040
https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html
設定とかの参考
https://learnembeddedsystems.co.uk/133-2
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Pico Debug",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"gdbPath": "C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.10/bin/arm-none-eabi-gdb.exe",
"device": "RP2040",
"configFiles": [
"c:/pico/openOCD/tcl/interface/picoprobe.cfg",
"c:/pico/openOCD/tcl/target/rp2040.cfg"
],
"svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
"runToMain": true,
"postRestartCommands": [
"break main",
"continue"
]
}
]
}
setting.json
{
"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",
"cortex-debug.openocdPath": "c:/pico/openocd/openocd.exe",
"cortex-debug.gdbPath": "arm-none-eabi-gdb"
}