Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7512

SDK • Re: Configuring OpenOCD/VScode in WSL2

$
0
0
I've been using this to develop on a Pico 2 W with the Pi debug probe and it works. The appropriate fields need to be set for the board and cpu type. I'm running VS Code and tools on windows 11 so don't know if anything else needs to be different for Ubuntu.

Code:

{  "version": "0.2.0",  "configurations": [    {      "name": "Pico 2 W (RP2350, cm0)",      "type": "cortex-debug",      "request": "launch",      "servertype": "openocd",      "cwd": "${workspaceFolder}",      "executable": "${workspaceFolder}/build/Meter_Reader.elf",      // Use the Arm GCC GDB that matches your toolchain      "gdbPath": "C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/14.3 rel1/bin/arm-none-eabi-gdb.exe",      // Use the OpenOCD you confirmed works      "serverpath": "C:/Users/jdavi/.pico-sdk/openocd/0.12.0+dev/openocd.exe",      "searchDir": [        "C:/Users/jdavi/.pico-sdk/openocd/0.12.0+dev/scripts"      ],      "configFiles": [        "interface/cmsis-dap.cfg",        "c:/Users/jdavi/Meter_Reader/openocd-local.cfg",        "target/rp2350.cfg"      ],      // Make sure we talk to cm0, and run the SWD faster than 100 kHz      "preLaunchCommands": [        "monitor adapter speed 2000",        "monitor targets rp2350.cm0",        "monitor reset halt"      ],      "postLaunchCommands": [        "monitor targets rp2350.cm0"      ],      // Optional but helpful      "runToEntryPoint": "main",      "svdFile": "${env:PICO_SDK_PATH}/src/rp2350/debug/rp2350.svd",      "device": "RP2350",      "cpu": "cortex-m33",      // Keep this false unless you really want semihosting      "enableSwo": false    }  ]}

Statistics: Posted by jderickson — Wed Sep 10, 2025 9:28 pm



Viewing all articles
Browse latest Browse all 7512

Trending Articles