Unable to execute program in Freedom E300

Hi, i got a arty-a7-35t board, and i want to run risc-v cpu in it. I followed some guide and successfully boot and run SiFive freedom(commit id : commit b348a50d5d10ffa94ab2a07a33622b1c634a01ea) processor. However, when I try to upload software from freedom-e-sdk(commit id : 4d5cbec9118cbedf2d4ae5b54acaa22862245a4c) I get following msgs:
Error: unable to execute program: (abstractcs=0x10000301)

Info : Padding image section 0 with 2 bytes
Info : Padding image section 1 with 2 bytes
riscv.cpu: target state: halted
Error: PC ended up at 0x80000000 instead of 0x80000004
Error: Failed to execute algorithm at 0x80000000: -4
Error: error writing to flash at address 0x20000000 at offset 0x00400000

The detail msg is :

Open On-Chip Debugger 0.10.0-dev-g95a2eb157 (2023-07-11-20:32)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (<unknown>), part: 0x0000, ver: 0x2)
Info : dtmcontrol_idle=5, dmi_busy_delay=1, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=3, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=4, ac_busy_delay=0
Error: unable to execute program: (abstractcs=0x10000301)
Info : Examined RISC-V core
riscv.cpu: target state: halted
Info : accepting 'gdb' connection on tcp/3333
Info : Found flash device 'sp s25fl128' (ID 0x00182001)
0x00000000 in ?? ()
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (<unknown>), part: 0x0000, ver: 0x2)
JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (<unknown>), part: 0x0000, ver: 0x2)
Info : dtmcontrol_idle=5, dmi_busy_delay=5, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=5, aInfo : dtmcontrol_idle=5, dmi_busy_delay=6, ac_busy_delay=0
c_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=Info : dtmcontrol_idle=5, dmi_busy_delay=7, ac_busy_delay=0
6, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delaInfo : dtmcontrol_idle=5, dmi_busy_delay=8, ac_busy_delay=0
y=7, ac_busy_delay=0
dtmcontrol_idle=5, Info : dtmcontrol_idle=5, dmi_busy_delay=9, ac_busy_delay=0
dmi_busy_delay=8, ac_busy_delay=0
dtmcontrol_idle=5Info : dtmcontrol_idle=5, dmi_busy_delay=10, ac_busy_delay=0
, dmi_busy_delay=9, ac_busy_delay=0
dtmcontrol_iInfo : dtmcontrol_idle=5, dmi_busy_delay=12, ac_busy_delay=0
dle=5, dmi_busy_delay=10, ac_busy_delay=0
dtmcontroInfo : dtmcontrol_idle=5, dmi_busy_delay=14, ac_busy_delay=0
l_idle=5, dmi_busy_delay=12, ac_busy_delay=0
dtmcInfo : dtmcontrol_idle=5, dmi_busy_delay=16, ac_busy_delay=0
ontrol_idle=5, dmi_busy_delay=14, ac_busy_delay=0
dInfo : dtmcontrol_idle=5, dmi_busy_delay=18, ac_busy_delay=0
tmcontrol_idle=5, dmi_busy_delay=16, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=20, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=18, ac_busy_delaInfo : dtmcontrol_idle=5, dmi_busy_delay=23, ac_busy_delay=0
y=0
dtmcontrol_idle=5, dmi_busy_delay=20, ac_busInfo : dtmcontrol_idle=5, dmi_busy_delay=26, ac_busy_delay=0
y_delay=0
dtmcontrol_idle=5, dmi_busy_delay=23, ac_Info : dtmcontrol_idle=5, dmi_busy_delay=29, ac_busy_delay=0
busy_delay=0
dtmcontrol_idle=5, dmi_busInfo : dtmcontrol_idle=5, dmi_busy_delay=32, ac_busy_delay=0
y_delay=26, ac_busy_delay=0
dtmcontrol_idle=5, dmi_bInfo : dtmcontrol_idle=5, dmi_busy_delay=36, ac_busy_delay=0
usy_delay=29, ac_busy_delay=0
dtmcontrol_idle=5,Info : dtmcontrol_idle=5, dmi_busy_delay=40, ac_busy_delay=0
 dmi_busy_delay=32, ac_busy_delay=0
dtmcontrol_idle=Info : dtmcontrol_idle=5, dmi_busy_delay=45, ac_busy_delay=0
5, dmi_busy_delay=36, ac_busy_delay=0
dtmcontrolInfo : dtmcontrol_idle=5, dmi_busy_delay=50, ac_busy_delay=0
_idle=5, dmi_busy_delay=40, ac_busy_delay=0
dtmcontrInfo : dtmcontrol_idle=5, dmi_busy_delay=56, ac_busy_delay=0
ol_idle=5, dmi_busy_delay=45, ac_busy_delay=0
dtInfo : dtmcontrol_idle=5, dmi_busy_delay=62, ac_busy_delay=0
mcontrol_idle=5, dmi_busy_delay=50, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=69, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=56, ac_busy_delayInfo : dtmcontrol_idle=5, dmi_busy_delay=76, ac_busy_delay=0
=0
dtmcontrol_idle=5, dmi_busy_delay=62Info : dtmcontrol_idle=5, dmi_busy_delay=84, ac_busy_delay=0
, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=Info : dtmcontrol_idle=5, dmi_busy_delay=93, ac_busy_delay=0
69, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delaInfo : dtmcontrol_idle=5, dmi_busy_delay=103, ac_busy_delay=0
y=76, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busInfo : dtmcontrol_idle=5, dmi_busy_delay=114, ac_busy_delay=0
y_delay=84, ac_busy_delay=0
dtmcontrol_idle=5, dmi_bInfo : dtmcontrol_idle=5, dmi_busy_delay=126, ac_busy_delay=0
usy_delay=93, ac_busy_delay=0
dtmcontrol_idle=5, dmi_bInfo : dtmcontrol_idle=5, dmi_busy_delay=139, ac_busy_delay=0
usy_delay=103, ac_busy_delay=0
dtmcontrInfo : dtmcontrol_idle=5, dmi_busy_delay=153, ac_busy_delay=0
ol_idle=5, dmi_busy_delay=114, ac_busy_delay=0
dtmcoInfo : dtmcontrol_idle=5, dmi_busy_delay=169, ac_busy_delay=0
ntrol_idle=5, dmi_busy_delay=126, ac_busy_delay=0
dInfo : dtmcontrol_idle=5, dmi_busy_delay=186, ac_busy_delay=0
tmcontrol_idle=5, dmi_busy_delay=139, ac_busy_delay=0Info : dtmcontrol_idle=5, dmi_busy_delay=205, ac_busy_delay=0

dtmcontrol_idle=5, dmi_busy_delay=153, ac_Info : dtmcontrol_idle=5, dmi_busy_delay=226, ac_busy_delay=0
busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=169Info : dtmcontrol_idle=5, dmi_busy_delay=249, ac_busy_delay=0
, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=186, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=274, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=205, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=2Info : dtmcontrol_idle=5, dmi_busy_delay=302, ac_busy_delay=0
26, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=249, ac_busy_delay=0
dtmcontrol_idInfo : dtmcontrol_idle=5, dmi_busy_delay=333, ac_busy_delay=0
le=5, dmi_busy_delay=274, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=302, ac_busy_delay=Info : dtmcontrol_idle=5, dmi_busy_delay=367, ac_busy_delay=0
0
dtmcontrol_idle=5, dmi_busy_delay=333, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_deInfo : dtmcontrol_idle=5, dmi_busy_delay=404, ac_busy_delay=0
lay=367, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=404, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=445, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=445, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=490, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=490, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=540, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=540, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=595, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=595, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=655, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=655, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=721, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=721, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=794, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=794, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=874, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=874, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=962, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=962, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1059, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1059, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1165, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1165, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1282, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1282, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1411, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1411, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1553, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1553, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1709, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1709, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1880, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=1880, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2069, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=2069, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2276, ac_busy_delay=0
dtmcontrol_idle=5, dmi_busy_delay=2276, ac_busy_delay=0
cleared protection for sectors 64 through 255 on flash bank 0
cleared protection for sectors 64 through 255 on flash bank 0
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (<unknown>), part: 0x0000, ver: 0x2)
Info : dtmcontrol_idle=5, dmi_busy_delay=5, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=6, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=7, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=8, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=9, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=10, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=12, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=14, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=16, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=18, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=20, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=23, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=26, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=29, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=32, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=36, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=40, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=45, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=50, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=56, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=62, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=69, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=76, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=84, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=93, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=103, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=114, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=126, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=139, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=153, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=169, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=186, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=205, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=226, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=249, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=274, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=302, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=333, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=367, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=404, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=445, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=490, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=540, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=595, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=655, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=721, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=794, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=874, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=962, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1059, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1165, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1282, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1411, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1553, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1709, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1880, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2069, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2276, ac_busy_delay=0
Info : Padding image section 0 with 2 bytes
Info : Padding image section 1 with 2 bytes
riscv.cpu: target state: halted
Error: PC ended up at 0x80000000 instead of 0x80000004
Error: Failed to execute algorithm at 0x80000000: -4
Error: error writing to flash at address 0x20000000 at offset 0x00400000
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (<unknown>), part: 0x0000, ver: 0x2)
Info : dtmcontrol_idle=5, dmi_busy_delay=5, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=6, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=7, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=8, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=9, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=10, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=12, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=14, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=16, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=18, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=20, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=23, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=26, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=29, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=32, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=36, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=40, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=45, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=50, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=56, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=62, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=69, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=76, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=84, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=93, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=103, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=114, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=126, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=139, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=153, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=169, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=186, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=205, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=226, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=249, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=274, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=302, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=333, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=367, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=404, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=445, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=490, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=540, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=595, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=655, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=721, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=794, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=874, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=962, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1059, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1165, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1282, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1411, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1553, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1709, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=1880, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2069, ac_busy_delay=0
Info : dtmcontrol_idle=5, dmi_busy_delay=2276, ac_busy_delay=0
Loading section .init, size 0x72 lma 0x20400000
Loading section .text, size 0xb822 lma 0x20400074
Loading section .rodata, size 0xc28 lma 0x2040b898
Loading section .eh_frame, size 0x3c lma 0x2040c4c0
Loading section .data, size 0x8a8 lma 0x2040c4fc
Loading section .srodata, size 0x18 lma 0x2040cda4
Loading section .sdata, size 0x1c lma 0x2040cdbc
Error finishing flash operation
riscv.cpu: target state: halted
riscv.cpu: target state: halted
shutdown command invoked
shutdown command invoked
A debugging session is active.

	Inferior 1 [Remote target] will be detached.

My openocd.cfg is :


#source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]

interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid 0x15ba 0x002a

ftdi_layout_init 0x0808 0x0a1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
ftdi_layout_signal LED -data 0x0800
#

set _CHIPNAME riscv
# jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10e31913
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000913

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1

# flash bank my_first_flash fespi 0x20000000 0 0 0 $_TARGETNAME 0x10014000
flash bank my_first_flash fespi 0x20000000 0 0 0 $_TARGETNAME 0x10014000

init
#reset
if {[ info exists pulse_srst]} {
  ftdi_set_signal nSRST 0
  ftdi_set_signal nSRST z
}
halt
# flash protect 0 64 last off

Could you please help me to understand what I am doing wrong here? Thank u very much.

I followed some guide

“Some” guide?
What guide?

At a glance it looks likely to me that whatever way the FPGA design has been implemented results in some part of the debug mechanism not functioning properly.
So you should probably start by reviewing the FPGA design for connection issues, timing issues etc.

like Running a RISC-V Processor on the Arty A7 (Legacy) - Digilent Reference,
https://sifive.cdn.prismic.io/sifive%2Fed96de35-065f-474c-a432-9f6a364af9c8_sifive-e310-arty-gettingstarted-v1.0.6.pdf,

and some other issue like :

Hi,
I checked connection issues and other issues i can find, i found nothing about this error.
best,
zhenyu

I would suggest using a more up to date build of OpenOCD built from the RISC-V fork:

The one that you’re using is quite old.

If the new build of OpenOCD still has problems then you need to look at the verbose logging generated by openocd -d3 to see in more detail what’s going on/wrong with the debug connectivity.

If the debug block is constantly (?) or for extended periods of time reporting that it’s busy then that may suggest a problem on the FPGA IP implementation side.

Hi, Tommy
Thanks for the quick response. Cause i use the freedom-e-sdk repo, so the openocd commit id is 95a2eb157ab0f1569faf17ecb666b99532755136 as a submodule, and i don’t know if i can upgrade it to new version.
When i add -d3 to openocd, i got the continuous output of

Debug: 2534 2292 riscv.c:635 riscv_poll_hart(): polling hart 0, target->state=2 (TARGET_HALTED=2)
Debug: 2535 2392 riscv.c:651 riscv_openocd_poll(): polling all harts
Debug: 2536 2392 riscv.c:896 riscv_set_current_hartid(): setting hartid to 0, was 0

And i will upgrade openocd and retry it. Thank you very much.
best,
zhenyu

Hi, Tommy
I update the openocd, and it’s work now. Thanks again for your help!
best,
zhenyu