昨天wchlink调试ch32v307正常,今天发现启动调试错误,通过usb下载ch32v307工作是正常的,怀疑wchlink的问题, 请问wchlink固件在哪能下载到,希望刷一下wchlink试试。 手动调用openocd,错误如下: C:\MounRiver\MounRiver_Studio\toolchain\OpenOCD\bin>openocd -f wch-riscv.cfg Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-03-30-19:10) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' Ready for Remote Connections Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : WCH-Link version 2.3 Info : wlink_init ok Info : This adapter doesn't support configurable speed Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0) Warn : Bypassing JTAG setup events due to errors Error: OpenOCD only supports Debug Module version 2 (0.13) and 3 (1.0), not 0 (dmstatus=0x0). This error might be caused by a JTAG signal issue. Try reducing the JTAG clock speed. Warn : target riscv.cpu.0 examination failed Error: Debug Module did not become active. dmcontrol=0x0 Error: Debug Module did not become active. dmcontrol=0x0 Info : starting gdb server for riscv.cpu.0 on 3333 Info : Listening on port 3333 for gdb connections Error: Debug Module did not become active. dmcontrol=0x0 Error: Debug Module did not become active. dmcontrol=0x0 Error: OpenOCD only supports Debug Module version 2 (0.13) and 3 (1.0), not 0 (dmstatus=0x0). This error might be caused by a JTAG signal issue. Try reducing the JTAG clock speed. Error: Debug Module did not become active. dmcontrol=0x0 s
问题解决了,是杜邦线太差了,换根线就好了
我也遇到这类问题,WCHLINK的RISCV烧录调试协议抗干扰能力特别差,在稍微有一丁点干扰的地方就会各种报错,几乎无法正常调试.数次发帖询问,官方要么硬说没问题,要么答非所问. 调到绝望了,下次做产品还是选coetex-m核的mcu.
这是我遇得最多的情况,调试过程中,突然openocd输出一堆报错信息,然后就断开了.
您好,根据截图信息,报错可能是由Link传输数据错误或者是芯片状态不对导致的,可以检查一下WCH-Link模式是否正确,正常对RISC-V MCU下载调试时,状态应该是空闲时红灯常亮蓝灯常灭。此外,使用Link下载调试时,注意一下BOOT接法,BOOT0接VCC,BOOT1接GND。最后,注意使用Link下载时,连接Link和MCU的杜邦线不要过长,尽量短一些,调式时程序中最好不要有FLASH相关操作,或者开启看门狗、低功耗模式,都会影响仿真。
我这边也遇到类似的问题, 板子是 官方的 CH32V307 最小系统。刚开始是正常的,gdb连接上去过个 5min~ 15min 就会出错,报错为见图。
Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-02-22-15:09) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect 'sdi' Warn : Transport "sdi" was already selected Ready for Remote Connections Info : WCH-LinkE mode:RV version 2.8 Info : wlink_init ok Info : clock speed 6000 kHz Info : [wch_riscv.cpu.0] datacount=2 progbufsize=8 Info : [wch_riscv.cpu.0] Examined RISC-V core; found 1 harts Info : [wch_riscv.cpu.0] XLEN=32, misa=0x40901125 [wch_riscv.cpu.0] Target successfully examined. Info : starting gdb server for wch_riscv.cpu.0 on 3333 Info : Listening on port 3333 for gdb connections Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections