admin
我把MRS的opencod复制过去了,能识别了,但写的时候又遇到了新的问题
Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2024-07-29-15:30)
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.13
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=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 : flash size = 448kbytes
erased sectors 0 through 447 on flash bank 0 in 0.498269s
** Programming Started **
Error: couldn't open c
embedded:startup.tcl:1162: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1227
at file "embedded:startup.tcl", line 1162
我还是使用的之前的脚本命令
#!/bin/bash
firmwareFile=$(echo $1 | sed 's/\\/\//g')
echo "--------------------------------------------------"
echo "firmware: ${firmwareFile}"
echo "--------------------------------------------------"
./tools/wch_openocd/bin/openocd -f ./tools/wch_openocd/bin/wch-riscv.cfg \
-c init -c halt \
-c "flash erase_sector wch_riscv 0 last" \
-c "program ${firmwareFile}" \
-c "verify_image ${firmwareFile}" \
-c wlink_reset_resume -c exit