PlatformIO Community

Using PlatformIO debugger with Raspberry Pi Pico & Picoprobe

I’ve been building & debugging Raspberry Pi Pico code using a Picoprobe setup (one Pico acting as the SWD debug probe) within PlatformIO and using the PIO debugger.

The development environment is:

PlatformIO Core: 5.1.0
VSC: 1.53.2
Host: macOS Mojave 10.14.6
Target: Pico RP2040
Debug: Picoprobe

I thought I’d try lldb rather than gdb, as the latter can be awkward under macOS. I’ve tried debugging a few simple projects. The PIO debugger seems to work ok but there are some issues with inspecting variables.

I realize that a formal full PIO support for Raspberry Pico may not happen for quite sometime but a makeshift debugging seems to be doable in the interim.

Has anyone else tried using PIO with the Pico? If so, any insights you’d like to share? Thanks.

If you’re using PlatformIO with the Pico you’re using I think they’ll appriciate PR there if you got debugging to work – with either a custom config and instructions or python code.

You’re using the from the rp2040 branch?

Thank you for your response. I’ll look into my setup more later today.

I’m using OpenOCD from the RP2040 branch.

What debugger does PlatformIO use by default on macOS?

I wrote a couple of adapters in PIO assembler, one for reading caliper specific serial data, and the other for inverting a buffer through DMA. Works fine with a ridiculous low instruction count thanks to autopush and other clever capability of each state machine.
PIO is a very elegant solution, far more simpler to provide low level bit banging drivers than other solutions I tried already, like pSOC.
Further investigation is ongoing.

We added official support for Raspberry Pi Pico. Please check this post:

1 Like

Fantastic! Thank you.
PlatformIO is the best.

Hi zpm1066

As you stated, using GDB under macOS is awkward. I am trying to also use lldb with platformio.

Are you able to provide guidance on you made this work.

Thank you

The Picoprobe with the mbed-os Arduino core is working fine, Picoprobe with the Arduino-Pico (Earle Philhower) core is still giving me heartattacks. Use as a base project (it also contains the mbed-os Arduino + Picoprobe case).

It’s been quite a while since I last used Picoprobe. I switched over to using jlink with Segger Edu Mini probe, as it’s my preferred probe for debugging, where possible.

I think I used LLDB with Pico SDK when the Pico came out last year, not with PlatformIO. At the time, it was early days of Pico - PlatformIO debug support.

As per @maxgerhardt, Picoprobe - PlatformIO combination should work fine with mbed-os Arduino core. I haven’t tried debugging a Pico with Picoprobe and the Arduino-Pico (Earle Philhower) core.