Closed maxgerhardt closed 2 years ago
I actually just tried all OpenOCD versions released here,
x86_64-w64-mingw32.openocd-e3428fadb.210706
x86_64-w64-mingw32.openocd-d58c2ef5e.210629
x86_64-w64-mingw32.openocd-d58c2ef5e.210607
x86_64-w64-mingw32.openocd-d58c2ef5e.210328
And none could connect to the Pi Pico with the picoprobe adapter, all with the same error message as per above.
I'm attaching a zip compressed version of my Windows build here for comparison, which in the same setup is able to connect to the Pico perfectly fine, with the output per above, based on OpenOCD commit 18b4c358492206f2ac6c78acfec8021316bc707e (somehow g18b4c35 is printed in the output, but git log
shows the 18b4c35 commit as the last one).
That is very strange. While I did not test the absolute latest release which was cross-compiled from Linux, the prior one was built in a Windows VM manually (win32 only, both x64 and x32 versions are the same exe/dlls) and I an almost 100% certain that basic debugging worked for me.
This'll be in the queue. I honestly don't mind just repackaging your version as a blob if I can't get the cross-compile/VM-built one running, but I would like to verify it's failing everywhere and at least try and figure out WTH is going on...
Definitely strange.
Just for confirmation, I've tried selectin the Pi Pico (Picoprobe) board with your latest released Arduino core, no modifications, and uploading gives the same result.
Replacing the OpenOCD with my precompiled version gives
..a successfull connection to the board, but OpenOCD can't find the referenced file due to no / wrong escaping in the -c program {file}
part of the command :/ (I'll open a separate issue or PR for this is in the core).
Also be aware when testing in a Windows VM that I've used Zadig to load WinUSB drivers. In the issue linked 2 posts above there's a discussion that loading libusb-win32 drivers leads to a crash (segfault) when using libusb-1.0.dll
of the latest version (1.0.24), whereas loading WinUSB drivers does not.
And my final thought is that the OpenOCD version might be linked with a particular picoprobe firmware. I'm using the latest picoprobe.uf2 from https://www.raspberrypi.org/documentation/rp2040/getting-started/#board-specifications with the wireup as stated in https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf Appendix A.
@earlephilhower have you had time to look into this (OpenOCD version released here does not work on Windows)? If we get that resolved we can make the final push for back-integration into the official PlatformIO repos (platform-raspberrypi
)
@earlephilhower after an eternity they resolved https://github.com/raspberrypi/openocd/pull/41#issuecomment-951261119 and now there's a single OpenOCD version based on v0.11 with all debug adapters enabled in one (https://github.com/raspberrypi/openocd/tree/rp2040-v0.11.0), I'll try whether that works universally.
We're shipping OpenOCD v0.11.0 w/the latest builds, so this should be fixed.
When I use the latest
x86_64-w64-mingw32.openocd-e3428fadb.210706
from this repo and fire up OpenOCD to connect via the Picoprobe, I at first get a successfull connection, but then every 3 seconds there's an error message which finally results in OpenOCD shutting down and the previously lit-up light on the picoprobe to turn off.Verbose output (
-d3
)When I use the latest version of https://github.com/raspberrypi/openocd/ in the picoprobe branch, and I use the older libusb dll version as per https://github.com/raspberrypi/picoprobe/issues/3, I don't get this error.
Note though that once I use the OpenOCD from this version with the above command; I do need to re-plug the device for it to be usable again, otherwise I do run in the timeout errors.
Maybe something went wrong in the merge as detailed in #2 or the two branches aren't in fact mergable without these side-effects.
Side Info: OS is Windows 10 x64, the Picoprobe firmware comes directly from raspberrypi.org, I used Zadig to install libusb-win32 drivers for the device.
Less verbose output for my OpenOCD version