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.
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.
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.
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.