Skip to content

Adding launch.json for the debug probe #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ide/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The example assumes:
* `launch-probe-swd.json` if the target is connected via an SWD probe (e.g. picoprobe)
* `launch-raspberrypi-swd.json` if the target is directly connected to a Raspberry Pi GPIO
* `launch-remote-openocd.json` if VSCode should connect to an already running instance of `OpenOCD`.
* `launch-debug-probe.json` if the target is connected to a [Raspberry Pi Debug Probe](https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html)

> Be sure to review the selected file and make any changes needed for your environment.

Expand Down
31 changes: 31 additions & 0 deletions ide/vscode/launch-debug-probe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Pico Debug Probe",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
// This may need to be "arm-none-eabi-gdb" for some previous builds
"gdbPath" : "gdb-multiarch",
"serverArgs": [
"-c", "adapter speed 5000"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

],
"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"
]
}
]
}