Closed Yveaux closed 2 days ago
Progress! I tested various 'upload_protocols' and picoprobe
works, including debugging!
[env:rpipico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipico
framework = arduino
board_build.core = earlephilhower
upload_protocol = picoprobe
debug_tool = picoprobe
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 3.5% (used 9244 bytes from 262144 bytes)
Flash: [ ] 2.8% (used 57804 bytes from 2093056 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picoprobe
Uploading .pio\build\rpipico\firmware.elf
Open On-Chip Debugger 0.12.0+dev-gebec9504d (2024-08-27-18:27)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
adapter speed: 5000 kHz
[rp2040.core0] halted due to breakpoint, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
[rp2040.core1] halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
** Programming Started **
Warn : Function FUNC_BOOTROM_STATE_RESET not found in RP2xxx ROM. (probably an RP2040 or an RP2350 A0)
Warn : Function FUNC_FLASH_RESET_ADDRESS_TRANS not found in RP2xxx ROM. (probably an RP2040 or an RP2350 A0)
Warn : Adding extra erase range, 0x10011100 .. 0x10011fff
** Programming Finished **
** Verify Started **
** Verified OK **
[rp2040.core0] halted due to breakpoint, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
[rp2040.core1] halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
shutdown command invoked
================================================================ [SUCCESS] Took 5.11 seconds ================================================================
Did this change recently and did I miss it in the release notes maybe?
You should double check you're running the latest p.io git and follow up in @maxgerhardt 's repo on this. I believe P.IO uses different tool binaries for debugging than we do, and definitely uses different scripts. The core here has a new version of openocd
built for the RP2350 core, not sure if P.IO has moved up yet.
Looking into it. I did a change yesterday to redirect picropobe
into cmsis-dap
, maybe I did a small mistake.
https://github.com/maxgerhardt/platform-raspberrypi/commit/4c7c97edadce8b07104c9d28173c33b3b77c4079
Woopsie. That's a reproducable error. I was missing a bracket. You exactly cought the moment in which the bug was introduced. Now it's working again, just tested with debugprobe.
Fixed in https://github.com/maxgerhardt/platform-raspberrypi/commit/9e55f6db5c56b9867c69fe473f388beea4546672.
Delete C:\Users\<user>\.platformio\raspberrypi*
and rebuild.
Thanks gents for the fast response! As a user it's not always clear if an issue is in arduini-pico or in platformio support, buit I really appreciate both of you supporting where possible!
@maxgerhardt Do you know if there is a difference in functionality for cmsis-dap
vs picoprobe
with the rpi debugprobe?
The debugprobe firmware implements the CMSIS-DAP protocol. Picoprobe was the old name before Debug Probe, and it implemented an entirely different protocol (not CMSIS-DAP), and was since removed from the RaspberryPi's OpenOCD code. The old Picoprobe firmware / debugging way is not supported. I just redirect the name to CMSIS-DAP (DebugProbe) for legacy's sake.
Clear, thanks!
Hi there! I'm trying to upload to rpi pico with a raspberry debugprobe (this thing https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html, firmware 2.0.1). Everything is connected according to the manuals and is working correctly in Arduino-IDE (board manager URL: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json, Upload method: Picoprobe/Debugprobe (CMSIS_DAP)) with arduino-pico 4.0.2 installed, on Windows 11. debugprobe has WinUSB 6.1.7600.16385 driver installed with Zadig.
Arduino-IDE output:
Just running openocd in a windows command prompt also discovers the debugprobe with connected rp2040 correctly:
However, a simple blink sketch in platformio consistently fails to upload with
embedded:startup.tcl:28: Error: Can't find cmsis-dap
:platformio.ini
main.cpp
Strange thing is that this setup used to work, until I started updating things (platform-raspberrypi / arduino-pico, debugprobe firmware, debugprobe drivers etc, you know how this works in the chaos of trying to get things to work).
I went as far as uninstalling platformio from vscode, deleted the .platformio folder and the .pio and .vscode folders. Then restarted vscode, reinstalled platformio and platform-raspberrypi / arduino-pico.
About to loose my mind here... 🙄