我怀疑 v0.11.0的 openocd 是有些问题的,然后想升级 openocd 到 最新版 去仓库:https://github.com/openocd-org/openocd不管是72ff2e2d9f869cd19951ce101e5ac61209ec434d 还是 v0.12.0,走remote_bitbang 协议,都不能进行到 如下 这一步骤 Info:JTAG tap:riscv.cpu tap/device found:0x1e200a6f(mfg:0x537(Wuhan Xun Zhan Electronic Technology),part:0xe200,ver:0x1)但是 v0.11.0.是可以的,我怀疑某笔提交导致了这个问题.以 src/jtag/drivers/remote_bitbang.c 的 提交记录 开始二分查找,找到了这笔问题提交5765a0ce14485aadc6b74c6e2b4f15b73df14603(Speed up remote bitbang)然后在 所有的提交记录 中 验证,确实是这一笔提交导致的 revert 后,修复了 冲突,然后就可以了.Open On-Chip Debugger0.12.0+dev-01914-g72ff2e2d9-dirty(2025-03-25-10:44)Licensed under GNU GPL v2 For bug reports,read http://openocd.org/doc/doxygen/bugs.htmladapter speed:1000kHz Info:Initializing remote_bitbang driver Info:Connecting to192.168.20.240:44853Info:remote_bitbang driver initialized Info:Note:The adapter"remote_bitbang"doesn't support configurable speed Info:JTAG tap:riscv.cpu tap/device found:0x1e200a6f(mfg:0x537(Wuhan Xun Zhan Electronic Technology),part:0xe200,ver:0x1)Info:datacount=3progbufsize=1Info:Examined RISC-V core;found2harts Info:hart0:XLEN=32,misa=0x60Info:[riscv.cpu]Examination succeed Info:[riscv.cpu]starting gdb server on3333Info:Listening on port3333forgdb connections Info:Listening on port6666fortcl connections Info:Listening on port4444fortelnet connections Info:accepting'gdb'connection on tcp/3333
cmsis-dap 插入ubuntu时的log
[2039.235628]usb1-2.1:new full-speed USB device number4using uhci_hcd[2039.528765]usb1-2.1:New USB device found,idVendor=c251,idProduct=f001,bcdDevice=1.00[2039.528784]usb1-2.1:New USB device strings:Mfr=1,Product=2,SerialNumber=3[2039.528790]usb1-2.1:Product:CMSIS-DAP-JYD[2039.528794]usb1-2.1:Manufacturer:CMSIS-DAP by ARM[2039.528798]usb1-2.1:SerialNumber:0001A0000001[2039.545223]hid-generic0003:C251:F001.0002:hiddev0,hidraw1:USB HID v1.00Device[CMSIS-DAP by ARM CMSIS-DAP-JYD]on usb-0000:02:00.0-2.1/input2[2039.645198]cdc_acm1-2.1:1.0:ttyACM0:USB ACM device[2039.645214]usbcore:registered new interface driver cdc_acm[2039.645215]cdc_acm:USB Abstract Control Model driverforUSB modems and ISDN adapters