用openocd如何解除讀保護(hù)?

linkE+CH32V003開發(fā)板

擦除操作提示讀保護(hù),用openocd如何解除讀保護(hù)?。?/p>


...bin % ./openocd -f wch-riscv.cfg -c init -c halt -c "flash erase_sector wch_riscv 0 last" -c exit

Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-11-05-14:36)

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-LinkE-CH32V307? mod:RV version 2.7

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

Info : [riscv.cpu.0] datacount=2 progbufsize=8

Info : Examined RISC-V core; found 1 harts

Info :? hart 0: XLEN=32, misa=0x40800014

[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 : device id = 0x1b8cabcd

Info : flash size = 16kbytes

Error: Read-Protect Status Currently Enabled

Error: failed erasing sectors 0 to 15


/openocd -f wch-riscv.cfg -c init -c halt -c "flash protect wch_riscv 0 last? on " -c exit? 開啟讀保護(hù)

/openocd -f wch-riscv.cfg -c init -c halt -c "flash protect wch_riscv 0 last? off " -c exit? 關(guān)閉讀保護(hù)


我的也是同樣的錯(cuò)誤

Open?On-Chip?Debugger?0.11.0+dev-02415-gfad123a16-dirty?(2023-09-22-10:36)
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
Started?by?GNU?MCU?Eclipse
Info?:?Listening?on?port?6666?for?tcl?connections
Info?:?Listening?on?port?4444?for?telnet?connections
Info?:?WCH-LinkE??mode:RV?version?2.11?
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?:?accepting?'gdb'?connection?on?tcp/3333
Info?:?device?id?=?0x5659abcd
Info?:?flash?size?=?128kbytes
Warn?:?Prefer?GDB?command?"target?extended-remote?:3333"?instead?of?"target?remote?:3333"
Error:?Read-Protect?Status?Currently?Enabled
Error:?error?writing?to?flash?at?address?0x00000000?at?offset?0x00000000
Info?:?dropped?'gdb'?connection

這個(gè)是嘛意思 無法調(diào)試

我的CPU 是CH32V305


您好,如果是命令行的操作,請執(zhí)行一下2樓關(guān)閉讀保護(hù)的指令,如果是在MRS內(nèi)部,可按照下圖來。

image.png


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频