最開始可以仿真的,后面不知道怎么就不行了,重啟電腦板子啥的都試過;中間有用cmd openocd.exe測(cè)試過一些指令;
有人遇到過這個(gè)問題沒,才開始用MRS,不太熟悉。
目前現(xiàn)象:
板子通過USB重新設(shè)置打開仿真后SWD燒錄正常,程序運(yùn)行正常;
點(diǎn)仿真,報(bào)錯(cuò),程序自動(dòng)運(yùn)行;
點(diǎn)仿真之后,斷電重啟板子,板子程序不工作,必須點(diǎn)仿真才可以,或者重復(fù)1
控制臺(tái)報(bào)錯(cuò)輸出:
Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-01-03-10:00)
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.8?
Warn :? The debug interface has been opened,there is a risk of code leakage ,ensure that the debug interface has been closed before leaving factory !
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=0x40101105
[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 : flash size = 448kbytes
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (2143 ms). Workaround: increase "set remotetimeout" in GDB
Info : [wch_riscv.cpu.0] Found 0 triggers
Error: Couldn't find an available hardware trigger.
Error: can't add write watchpoint at 0x200040ac, resource not available
Error: Couldn't find an available hardware trigger.
Error: can't add write watchpoint at 0x450d85d2, resource not available