{
"version": "0.2.0",
"configurations": [
{
"name": "Pico Debug",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"openOCDLaunchCommands": ["adapter speed 5000"],
// This may need to be "arm-none-eabi-gdb" for some previous builds
"gdbPath" : "arm-none-eabi-gdb",
"device": "RP2040",
"configFiles": [
// This may need to be "interface/picoprobe.cfg" for some previous builds
"interface/cmsis-dap.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"
]
}
]
}
Hope this helps to improve Getting Started doc and other Mac users, now I can build and debug pico programs.
In Getting Started https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf Build tools on MacOS Sonoma, didn't work, couldn't build anything, page 37:
corrected like this:
This probably requires another test and review...
When building openOCD, install step is missing, page 63, commands:
You should add:
Missing install step causes vscode not finding openocd and/or required scripts for debug.
Debugging in VSCode using pico probe (page:65) needed to add in launch.json copy from (launch-probe-swd.json):
Setting is taken from better way to test working openocd when pico probe is connected
also needed to change to go along with arm tools:
to:
So final launch.json for MAC is:
Hope this helps to improve Getting Started doc and other Mac users, now I can build and debug pico programs.