Seamless Raspberry Pi Pico debugging with J-Link on its way!

Segger have released an updated firmware for their inexpensive J-Link Edu Mini (USD$18) and their superb Ozone debugger, that allows Raspberry Pi Pico to be debugged like any other J-Link enabled device.

Thanks to @vorosj in Raspberry Pi RP2040 microcontroller - PIO support when? :), for bringing attention to this important Pico RP2040 update to all of us who prefer to use PlatformIO with J-Link.

Last week, Segger released

  • Edu Mini firmware v6.9.6
  • Ozone v3.22b (RP2040_M0_0, SWD, 4MHz)

Segger are in the process of adding QSPI support. This will enable flash programming of Pico. Given the rapid pace at which Segger are updating their J-Link firmware, full J-Link upload & debug firmware support should be available in the next few weeks or sooner.

Currently, once the debug version of a Pico program has been uploaded via USB, Pico can be debugged via J-Link with Segger Ozone debugger using the attach to running program option.

In my debug testing of a ST7789V display connected to a Pico (J-Link Edu Mini, Pico RP2040, macOS 10.14.6, ST7789V 135x240 using Ozone), debug sessions worked well.

We’ll get to seamless Pico debugging via J-Link once QSPI support has been added. There will be no need to use a dual Pico setup (i.e. Picoprobe).

All of this abodes well for adding Raspberry Pi Pico to PlatformIO 1-click debugging solution support in the near future.

1 Like

Now the QSPI flashing is working with the new v6.98. They are fast… :slight_smile:

Cool! Yes, just noticed that Segger posted the J-Link v6.98 update with QSPI flash programming support today.

Are you performing the upload & debug to Raspberry PI Pico using PlatformIO or WizIO? I haven’t tried the latter yet but will soon.

I didn’t tried, AFAIK it’s not supported yet.

However, editing and compiling the code is working in PlatformIO using the WizIO port. I can upload the code either in PIO using "upload port: D:" in the .ini, or in Ozone using the .elf file.

Ozone upload is working, but it has a subsequent connection problem. There is an easy workaround. Debugging fails after upload, target reset doesn’t help. But disconnect-reconnect JLink helps, after that “attach to running program” is working. Ozone is the best debug tool I ever met.

J_Flash lite is working too. Better to use .hex, because the start address is not zero for .bin.
After erase chip, a target reset required before flashing.

It’s a bit uncomfortable, that no power for the target from the JLink edu

mini, and most of my targets has no micro swi connector. So I built a 3.3V LDO and the mini to a small 3d printed box with 2.54mm pin headers. The yellow jumper connects the 3.3V to VTRef.

1 Like

Thank you for sharing the info. A nice case for the J-Link Edu Mini.

Pico RP2040 debugging using jlink is now possible with the PlatformIO RaspberryPi platform dev branch.

With assistance from @valeros, I was able to debug a blink sketch using a Pico (Pimoroni Tiny2040) and SEGGER Edu Mini, see

Request to Add J-Link and ST-Link Upload & Debug Support to RP2040 Picoplatformio/platform-raspberrypi#5

If you already have the dev platform installed from platformio/platform-raspberrpi repository, please update it via run pio platform update raspberrypi.

Also, as per the above link, Pico RP2040 debugging using a stlink probe isn’t currently possible.

Uploads to a Pico using jlink isn’t currently working. It may be an issue with OpenOCD or possibly a bug in the SEGGER jlink firmware. I’ll investigate further.

Wonderful news!

After the switch from using .bin to .hex files for jlink, uploads to Pico work consistently. Only a RESET of the Pico is required before an upload.

Much appreciation to @valeros for making the PlatformIO change and @vorosj for assisting with the debugging issues.

In order to try out the J-Link upload feature, please update the platformio- raspberrypi platform, via run pio platform update raspberrypi.

I’m able to both upload & debug a simple RGB blink program on my Pimoroni Tiny2040 board with a Edu Mini J-Link probe. Fantastic!!

2 Likes