打印
[单片机芯片]

Mounriver不能进入单步调试模式?

[复制链接]
1042|9
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
gaobq|  楼主 | 2022-3-22 11:26 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
使用Mounriver生成的默认工程CH32V103C8T6,官方的开发板,下载程序可以运行,打开串口能够收到信息。

在Mounriver的debug模式下,点击debug菜单,报错,不能进入调试代码状态,信息如下:
Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-03-10-09:55)
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
Started by GNU MCU Eclipse
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 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
Info : [riscv.cpu.0] datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x0
[riscv.cpu.0] Target successfully examined.
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x37f4abcd
Info : flash size = 0kbytes
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors


Mounriver软件和WCH-LINK 都是最新版本,请问可能是什么原因?我怎样才能够单步调试?

使用特权

评论回复
沙发
gaobq|  楼主 | 2022-3-22 11:30 | 只看该作者
看提示信息,似乎是wch-link选择了jtag,且jtag的速度配置的不合适,mounriver里面找不到配置wch接口和速度地方,wch-linker只有swd接口吧,怎么还有jtag的事?

使用特权

评论回复
板凳
gaobq|  楼主 | 2022-3-22 14:15 | 只看该作者
使用CH32V307-EVT-R1,进行调试,首先提示必须升级WCH-linker固件,没有问题,升级后,CH32V307,可以单步调试
将CH32V307-EVT-R1的wch-linker,外接CH32V103-R1-1.40,下载程序没有问题,信息如下:
------------ Begin flash process of "obj\CH32V103C8T6.hex" ------------
14:07:09:543 >> Current project vendor is WCH, debugger is WCH-Link

14:07:09:544 >> Starting to Open Link in RISC-V APP mode...
14:07:09:545 >> Open Link in RISC-V APP mode Success

14:07:09:545 >> Starting to get link mode...
14:07:09:559 >> Link is under APP mode

14:07:09:559 >> Starting to compare firmware version...
14:07:09:559 >> No need to update. Already the latest version. Version is v2.3.

14:07:09:559 >> Starting to Send Chip Type...
14:07:09:567 >> Send Chip Type Success

14:07:09:567 >> Starting to Erase All...
14:07:09:577 >> Erase All Success

14:07:09:577 >> Starting to Download & Verify...
14:07:10:652 >> Download & Verify Success

14:07:10:652 >> Starting to Reset...
14:07:10:655 >> Reset Success

14:07:10:655 >> Starting to Close Link...
14:07:10:655 >> Close Link Success
Operation Finished (took 1s.112ms)
---------------------------------End ----------------------------------


可以选择调试,依然进行不下去,信息如下:
Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-03-10-09:55)
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
Started by GNU MCU Eclipse
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 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
Info : [riscv.cpu.0] datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x0
[riscv.cpu.0] Target successfully examined.
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x37f4abcd
Info : flash size = 0kbytes
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors




使用特权

评论回复
地板
gaobq|  楼主 | 2022-3-22 14:27 | 只看该作者

换这个CH32V103R-R0-1V2的小板子,下载,单步仿真正常,说明是CH32V103C-R1-1V0的问题,硬件如果出问题了吧,download又正常,莫名其妙?

使用特权

评论回复
5
WCHTech2| | 2022-3-22 15:02 | 只看该作者
您好,你这芯片可能是较老版本的芯片,可联系我们销售申请一下新版本的样片。

使用特权

评论回复
6
gaobq|  楼主 | 2022-3-22 15:20 | 只看该作者
本帖最后由 gaobq 于 2022-3-22 15:23 编辑

谢谢,这个批号401925A28,立创商城在售的片子是新版本的吧,采购时捎带一片,换换试试。

使用特权

评论回复
7
sadicy| | 2022-4-9 15:43 | 只看该作者
看芯片都能看出版本批次来?

使用特权

评论回复
8
15298419| | 2022-4-9 23:35 | 只看该作者
我手头上的  CH32V103R-R1-1V1感觉也是这样的问题,芯片型号是 CH32V103R8T6 批次号为:401926B03,是不是换一片最新的芯片就解决问题了?

使用特权

评论回复
9
gaobq|  楼主 | 2022-4-11 09:20 | 只看该作者
我还没有换,从立创商城买了批号401939B40,不知道能否解决问题

使用特权

评论回复
10
redone| | 2022-4-12 15:41 | 只看该作者
通病?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

170

主题

823

帖子

5

粉丝