Skip to content

Latest commit

 

History

History
52 lines (49 loc) · 2.72 KB

README.md

File metadata and controls

52 lines (49 loc) · 2.72 KB

messing with rp2040

Hi! if you stumbled upon this github repository you might be looking to work with your rp2040 on a lower level or trying to understand how it works.. that's what i was trying to do here! The code contains nothing special, so here's

a few tips:

my working enviroment

issues

So three things to note:

  1. The guide i initially followed is old and uses deprecated configs and executables, so i made my own config file:
{
    "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 depending on your system
            "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",
            // Work around for stopping at main on restart
            "postRestartCommands": [
                "break main",
                "continue"
            ],
            "searchDir": ["your path to tcl here"],
        }
    ]
}
  1. For whatever reason the svd file provided when you install the pico-sdk doesn't work, at least in my case it doesn't let you mess with the peripherial registers and shows them all as read-only, so you will need to download this one instead and replace the old one with it ${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd.

  2. Make sure to download the right firmware if you're using an rp2040 to debug another rp2040 select the downloads with the name "picoprobe" and not "debugprobe"

cool resources