memo openocd with picoprobe: install libhidapi: apt install libhidapi-dev when compiling openocd, you need to add support for cmsis-dap : ./configure --enable-cmsis-dap openocd use example: sudo openocd -f interface/cmsis-dap.cfg -c "adapter speed 5000" -f target/rp2040.cfg -c "program blink.elf verify reset exit" for vscode to work: usermod -aG plugdev user add openocd udev rules (just google it) in the project folder add: .vscode/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" / "gdb-multiarch" for some previous builds "gdbPath" : "gdb-multiarch", "device": "RP2040", "configFiles": [ "interface/cmsis-dap.cfg", "target/rp2040.cfg" ], "openOCDLaunchCommands": ["adapter speed 5000"], "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" ] } ] } .vscode/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", "cortex-debug.objdumpPath": "/usr/bin/arm-none-eabi-objdump", "cortex-debug.gdbPath": "gdb-multiarch", "files.associations": { "queue.h": "c" } }