earlephilhower / pico-quick-toolchain

GCC Cross-compiler chain for Raspberry Pi Pico
35 stars 6 forks source link

Update to OpenOCD 0.12? #25

Closed rgrr closed 1 year ago

rgrr commented 1 year ago

Hello Earle,

don't want to bother you (I'm the one who filed issue #23)... but would it be possible to update to openocd 0.12?

The currently used openocd 0.11 has an issue with more recent CMSIS-DAP protocol, specific > 2.0.0 or anything after CMSIS 5.7.0 which is almost 3 years old.

Problem is, that openocd 0.11 cannot handle DAP_Info/Capabilities with two bytes and thus rejects connection. On the other hand pyocd requires a newer CMSIS-DAP version for its auto-detect feature.

Open On-Chip Debugger 0.11.0-g228ede43d-dirty (2022-12-23-00:38)
...
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614C775B1D4D35
Info : CMSIS-DAP: FW Version = 2.1.1
Info : CMSIS-DAP: Serial# = E6614C775B1D4D35
Error: CMSIS-DAP: SWD not supported
Error: No Valid JTAG Interface Configured.

With openocd 0.12 it's working of course:

Open On-Chip Debugger 0.12.0
...
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614C775B1D4D35
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.1.2
Info : CMSIS-DAP: Serial# = E6614C775B1D4D35
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
earlephilhower commented 1 year ago

Sorry, I don't think that's possible. We need to support Picoprobe which means we're stuck with the Raspberry Pi fork, rp2040 branch. That has not been updated to 0.12.

I think your best bet is to build/get a 0.12 binary and stuff it in place of the one from this package set. Since you don't use Picoprobe it should be fine there.

You could also open a raise in the RPI OpenOCD fork and see if they'd be willing to pull upstream.

rgrr commented 1 year ago

Ok, I didn't think about that. I will check the possibilities ;-) I guess we can close this then.