Skip to content

Update needed to "Raspberry Pi Debug Probe" for PICO 2 #4003

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
cpottle9 opened this issue Jan 11, 2025 · 10 comments
Open

Update needed to "Raspberry Pi Debug Probe" for PICO 2 #4003

cpottle9 opened this issue Jan 11, 2025 · 10 comments
Labels
backlog We'll be getting to it eventually rp2040 Something to do with Pico or RP2040

Comments

@cpottle9
Copy link

I see two issues that need to be addressed.

  1. There is no PICO2 H. Need to describe manually installing headers.

  2. The openocd version available on the PI 4 bookworm does not support the 2350.
    I eventually found the repo https://github.com/raspberrypi/openocd/tree/sdk-2.0.0 and built openocd.
    Not trivial.
    You need to either provide a detailed recipe or provide downloadable binaries.

@cpottle9
Copy link
Author

Someone pointed out on Raspberry PI Forums that instructions for building openocd for PICO 2 is are included in Appendix A of https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf.

I think that information belongs with the rest of the Debug Probe documentation here: https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html.

@lurch
Copy link
Contributor

lurch commented Jan 14, 2025

There is no PICO2 H. Need to describe manually installing headers.

See also #3831 (which has unfortunately auto-closed) EDIT: Now re-opened

The openocd version available on the PI 4 bookworm does not support the 2350.

That's a good point. @P33M and @XECDesign we currently have openocd 0.12.0-1+rpt1 (which supports RP2040) in our APT repos, but it probably ought to be updated to a version that supports RP2350 ?

@XECDesign
Copy link
Contributor

I haven't heard anything from any maintainer of our OpenOCD fork asking for the package to be updated, so I assume it's not ready yet.

@cpottle9
Copy link
Author

I guess the process for updating openocd for raspberry pi os would include upstreaming the RP2350 changes to the main openocd repo and then waiting for an official version.
That is the only way to ensure all the other hardware targest are supported.

In the meantime I think it would be sufficient to update the debug probe documentation providing a link to appendix A of "Getting started with Raspberry Pi".

I wasted a couple of finding raspberry pi openocd repo and figuring out how to build it.
This small change would have helped me immensely.

Lastly, I agree with issue #3831.
A photo of a PICO 2 and PICO W with the 3 pin header soldered in place and the cable connected.

@lurch lurch added the rp2040 Something to do with Pico or RP2040 label Mar 8, 2025
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@lurch
Copy link
Contributor

lurch commented May 11, 2025

https://github.com/raspberrypi/debugprobe/releases/ contains debugprobe_on_pico2.uf2 and https://github.com/raspberrypi/pico-sdk-tools/releases contains openocd-0.12.0+dev-aarch64-lin.tar.gz - does that meet your requirements?

@P33M and @will-v-pi - is there any reason why the version of openocd in our APT repos can't / shouldn't be updated?

@lurch lurch removed the stale issue label May 11, 2025
@cpottle9
Copy link
Author

@lurch, my issue is not about the debugprobe*.uf2 files.
I identified two issues in my original text.

The first is I did not see any documentation on using the debug probe with a Pico other than a Pico H.
I now see a note in Raspberry Pi Debug Probe#Getting Started that describes soldering header pins.
That note has been there for quite a while. I missed that when reading the document. Bad me....
Having said that, adding a picture of a pico with the header installed would be helpful.

The second issue is how to use acquire an openocd version for rp2350 and how to use it.
That is documented in one place only, appendix A of Getting Started with Pico and ....

Rightly or wrongly, I assumed everything I need to know to use the debug probe would be included in Raspberry Pi Debug Probe.
At a minimum, there should be a reference in Raspberry Pi Debug Probe to appendix A of the Getting Started... document.

I agree the raspberry pi apt repos should include a version of openocd that support the rp2350.

@lurch
Copy link
Contributor

lurch commented May 12, 2025

At a minimum, there should be a reference in Raspberry Pi Debug Probe to appendix A of the Getting Started... document.

There is 🙂 (although it's admittedly a bit buried away and should probably be more prominent).

Image

Given that https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#install-tools has now drifted so far out of sync with Appendix A of the "Getting started with Raspberry Pi Pico-series" PDF, I wonder if it might be better to just delete those instructions entirely and only refer to the GettingStarted Appendix? That way we'd only need to keep the instructions up to date in one place. 🤔 WDYT @JamesH65 and @mudge ?

@cpottle9
Copy link
Author

Before I get into my detailed response to your most recent comment:

  • Using GDB to debug is not a 'getting started' thing. From my coding experience (over 40 years) I can tell you many developers get through their entire careers debugging with print statements.
  • Clearly, the portal Raspberry Pi Documentation is intended to be a user friendly entry point the documentation. The section for debug probe could be much better and moving content from it to the appendix of pdf will make it less user friendly.
  • In section '4.3 Debug' of Getting started with Raspberry Pi Pico I see a link to Raspberry Pi Debug Probe. Circular references in documentation is not ideal. You folks need to decide which document is definitive.

@lurch, the text you captured is clearly in the section Install GDB.
And the placement of the sentence makes it look like it applies to MS Windows only.
Further, the text is incorrect in that Getting Started with Raspberry Pi Pico does not have a chapter 9.

Scanning through Raspberry Pi Debug Probe I also see a reference to chapter 6 of Getting Started with Raspberry Pi Pico .
There are only 5 chapters.

I would suggest Raspberry Pi Debug Probe needs significant rework to include RP2350 and other details.

@lurch lurch added the backlog We'll be getting to it eventually label May 12, 2025
@lurch
Copy link
Contributor

lurch commented May 12, 2025

I would suggest Raspberry Pi Debug Probe needs significant rework to include RP2350 and other details.

I agree, but we're currently a bit light on the amount of time and resources we're able to allocate to documentation, so I've added this to the 'backlog' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We'll be getting to it eventually rp2040 Something to do with Pico or RP2040
Projects
None yet
Development

No branches or pull requests

3 participants