最近正在使用貴公司提供的CH347T芯片對一款國產(chǎn)MCU使用JTAG在線調(diào)試。
我將:?https://gitee.com/m32/openocd?中的ch347驅(qū)動代碼添加到了:https://github.com/hpmicro/riscv-openocd?
編譯出openocd后在線調(diào)試發(fā)現(xiàn):
```
Open On-Chip Debugger 0.11.0+dev-02542-g04f9291b7-dirty (2023-03-10-15:02)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 10000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Open CH347 Sucess.
Info : Setting ch347 clock: 10000000
Info : CH347WriteData Result: 0
Error: libusb_bulk_read error: LIBUSB_ERROR_TIMEOUT -7
Info : CH347ReadData Result: -6
Error: Couldn't set CH347 TCK speed
Info : clock speed 10000 kHz
Info : CH347WriteData Result: 0
Info : CH347WriteData Result: 0
Warn : There are no enabled taps.? AUTO PROBING MIGHT NOT WORK!!
Info : CH347WriteData Result: 0
Info : CH347ReadData Result: 0
Error: libusb_bulk_read error: LIBUSB_ERROR_TIMEOUT -7
Info : CH347ReadData Result: -6
Error: CH347_Read read data failure.
Error: CH347_WriteRead read usb data failure.
Info : CH347WriteData Result: 0
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Info : CH347WriteData Result: 0
Error: libusb_bulk_read error: LIBUSB_ERROR_OVERFLOW -8
Info : CH347ReadData Result: -4
Error: CH347_Read read data failure.
Error: CH347_WriteRead read usb data failure.
Info : CH347WriteData Result: 0
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined
```
其中有部分我自己添加調(diào)試打印信息,我發(fā)現(xiàn)
CH347ReadData-->jtag_libusb_bulk_read-->libusb_bulk_transfer
讀取CH347_EPIN 0x86的端點(diǎn)失敗,多數(shù)為:LIBUSB_ERROR_TIMEOUT
目前卡在與CH347的通訊上,不知道該如何解決該問題。