ch32v103c8t6 linux openocd 烧写程序失败

MRS_Toolchain_Linux_x64_V1.10.tar.gz编出来的bin和hex,用openocd烧不成功,Programming Started到Programming finished卡了很久,然后验证失败。把hex替换windows项目里的hex,用windows的MRS IDE可以烧进去。


[calvin OPENOCD/bin] -> sudo ./openocd -f wch-riscv.cfg -c init -c halt -c "flash erase_sector wch_riscv 0 last " -c exit
[sudo] password for calvin:
Open On-Chip Debugger 0.10.0+dev-gb0ae840-dirty (2021-05-25-18:18)
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 : WCH-Link version 00.00
Info : wlink_init ok
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x20000001 (mfg: 0x000 (), part: 0x0000, ver: 0x2)
Warn : Bypassing JTAG setup events due to errors
Info : datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40101105
Info : Listening on port 3333 for gdb connections
erased sectors 0 through last on flash bank 0 in 0.010086s

[calvin OPENOCD/bin] -> sudo ./openocd -f wch-riscv.cfg  -c init -c halt  -c "program /opt/Test.bin  0x08000000"  -c exit
Open On-Chip Debugger 0.10.0+dev-gb0ae840-dirty (2021-05-25-18:18)
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 : WCH-Link version 00.00
Info : wlink_init ok
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x20000001 (mfg: 0x000 (), part: 0x0000, ver: 0x2)
Warn : Bypassing JTAG setup events due to errors
Info : datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40101105
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: riscv.cpu tap/device found: 0x20000001 (mfg: 0x000 (), part: 0x0000, ver: 0x2)
Warn : Bypassing JTAG setup events due to errors
** Programming Started **
** Programming Finished **

[calvin OPENOCD/bin] -> sudo ./openocd -f wch-riscv.cfg -c init -c halt -c "verify_image /opt/Test.bin"    -c exit
Open On-Chip Debugger 0.10.0+dev-gb0ae840-dirty (2021-05-25-18:18)
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 : WCH-Link version 00.00
Info : wlink_init ok
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x20000001 (mfg: 0x000 (), part: 0x0000, ver: 0x2)
Warn : Bypassing JTAG setup events due to errors
Info : datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40101105
Info : Listening on port 3333 for gdb connections
Info : checksum mismatch - attempting binary compare
diff 0 address 0x00000000. Was 0xff instead of 0x6f
diff 1 address 0x00000001. Was 0xff instead of 0x00
diff 2 address 0x00000002. Was 0xff instead of 0x40
diff 3 address 0x00000003. Was 0xff instead of 0x32
diff 4 address 0x00000004. Was 0xff instead of 0x13
diff 5 address 0x00000005. Was 0xff instead of 0x00
diff 6 address 0x00000006. Was 0xff instead of 0x00
diff 7 address 0x00000007. Was 0xff instead of 0x00
diff 8 address 0x00000008. Was 0xff instead of 0x13
diff 9 address 0x00000009. Was 0xff instead of 0x00
diff 10 address 0x0000000a. Was 0xff instead of 0x00
diff 11 address 0x0000000b. Was 0xff instead of 0x00
diff 12 address 0x0000000c. Was 0xff instead of 0x13
diff 13 address 0x0000000d. Was 0xff instead of 0x00
diff 14 address 0x0000000e. Was 0xff instead of 0x00
diff 15 address 0x0000000f. Was 0xff instead of 0x00
...
diff 120 address 0x00000078. Was 0xff instead of 0x6f
diff 121 address 0x00000079. Was 0xff instead of 0xf0
diff 122 address 0x0000007a. Was 0xff instead of 0x9f
diff 123 address 0x0000007b. Was 0xff instead of 0xf8
diff 124 address 0x0000007c. Was 0xff instead of 0x6f
diff 125 address 0x0000007d. Was 0xff instead of 0xf0
diff 126 address 0x0000007e. Was 0xff instead of 0x5f
diff 127 address 0x0000007f. Was 0xff instead of 0xf8
More than 128 errors, the rest are not printed.

[calvin OPENOCD/bin] -> uname -a
Linux debian 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux


官网下载最新版可解决上述问题


可以了,多谢


只有登录才能回复,可以选择微信账号登录