ch32v307 openocd

我用openocd下代碼

Info : device id = 0x7b45b051

Info : flash size = 288kbytes

Info : ROM 192 kbytes RAM 128 kbytes

Info : Flash write discontinued at 0x00028778, next section at 0x00030000

Warn : no flash bank found for address 0x00048000

報(bào)錯(cuò)是為什么

您好,有可能是代碼超出192K的范圍了,可將FLASH、RAM的配置修改成288K+32K試一下。此外,麻煩說一下是調(diào)試還是命令行下載,完整的輸出信息是啥,可以截圖發(fā)出來看一下。



Info : only one transport option; autoselect 'sdi'

Warn : Transport "sdi" was already selected

Ready for Remote Connections

Info : WCH-LinkE? mode:RV version 2.9

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 : gdb port disabled

** Programming Started **

Info : device id = 0x7b45b051

Info : flash size = 288kbytes

Info : ROM 192 kbytes RAM 128 kbytes

Info : Flash write discontinued at 0x00028778, next section at 0x00030000

Warn : no flash bank found for address 0x00048000

** Programming Finished **

shutdown command invoked




另外,我用了CH32的非零等待區(qū),所以代碼是比192K大的,如果用MRS是可以下載的


而且我注意到他報(bào)回來的log顯示

Info : flash size = 288kbytes

Info : ROM 192 kbytes RAM 128 kbytes

Info : Flash write discontinued at 0x000284e0, next section at 0x00030000

Warn : no flash bank found for address 0x00048000


我有兩個(gè)問題:

1. Info : Flash write discontinued at 0x000284e0, next section at 0x00030000這句是在說什么意思,為什么flash寫入沒有繼續(xù)

2.?0x00048000是288kbytes,但是我整個(gè)配置都沒有288kbytes,這個(gè)288kbytes是從哪蹦出來的


openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\SRB2\\SRB-CH32V" -f "c:/Users/lee88/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f "C:/MounRiver/MounRiver_Studio/toolchain/OpenOCD/bin/wch-riscv.cfg"

Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2024-01-24-13:40)

Licensed under GNU GPL v2

For bug reports, read

? ? ? ? http://openocd.org/doc/doxygen/bugs.html

CDLiveWatchSetup

Info : only one transport option; autoselect 'sdi'

Warn : Transport "sdi" was already selected

Ready for Remote Connections

Info : Listening on port 50001 for tcl connections

Info : Listening on port 50002 for telnet connections

Info : WCH-Link-CH549? mode:RV version 2.10?

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=0x40901105

[wch_riscv.cpu.0] Target successfully examined.

Info : starting gdb server for wch_riscv.cpu.0 on 50000

Info : Listening on port 50000 for gdb connections

Info : accepting 'gdb' connection on tcp/50000

Info : device id = 0x7136abcd

Info : flash size = 32kbytes

Info : Flash write discontinued at 0x00000004, next section at 0x00002000

Error: error writing to flash at address 0x00000000 at offset 0x00000000


我也遇到了相同的問題。

似乎程序在FLASH中分多個(gè)部分,就會(huì)遇到這個(gè)問題。

這個(gè)問題,你解決了嗎?


您好,可以參考下圖配置一下是否還會(huì)有該問題

image.png


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

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