Nobody found the problem ?
I get the same errors on my HiFive1 Rev A01.
I flashed «hello_world» zephyr program successfully first :
$ west init ~/zephyrhifive
$ cd ~/zephyrhifive
$ west update
$ cd ~/zephyrhifive/zephyr
$ west build -b hifive1 samples/hello_world
Flashed with following command :
$ west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner hifive1
Open On-Chip Debugger 0.10.0+dev-01508-gf79c90268-dirty (2021-03-26-16:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select '.
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: 0x10e31913 (mfg: 0x489 (SiFive, Inc.), part: 0x0e31, ver: 0x1)
Info : Examined RISCV core; XLEN=32, misa=0x40001105
Info : starting gdb server for riscv.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : [0] Found 2 triggers
halted at 0x2040019c due to debug interrupt
Info : Found flash device 'issi is25lp128d' (ID 0x0018609d)
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Info : JTAG tap: riscv.cpu tap/device found: 0x10e31913 (mfg: 0x489 (SiFive, Inc.), part: 0x0e31, ver: 0x1)
halted at 0x2040019c due to debug interrupt
force hard breakpoints
0x2040019c in skip_callee_saved_reg () at /home/fabien/zephyrhifive/zephyr/arch/riscv/core/isr.S:886
886 LOAD_CALLER_SAVED(t1)
Info : JTAG tap: riscv.cpu tap/device found: 0x10e31913 (mfg: 0x489 (SiFive, Inc.), part: 0x0e31, ver: 0x1)
halted at 0x2040019c due to debug interrupt
Loading section vector, size 0x10 lma 0x20400000
Loading section exceptions, size 0x2b8 lma 0x20400010
Loading section text, size 0x3fdc lma 0x204002c8
Loading section initlevel, size 0x50 lma 0x204042a4
Loading section sw_isr_table, size 0x200 lma 0x204042f4
Loading section device_handles, size 0x36 lma 0x204044f4
Loading section rodata, size 0x338 lma 0x2040452c
Loading section datas, size 0xc0 lma 0x20404864
Loading section devices, size 0x90 lma 0x20404924
Info : Padding image section 0 at 0x2040452a with 2 bytes
Info : Retrying memory read starting from 0x80000000 with more delays
Info : Retrying memory read starting from 0x800010d8 with more delays
halted at 0x80000004 due to software breakpoint
halted at 0x80000004 due to software breakpoint
halted at 0x80000004 due to software breakpoint
Info : JTAG tap: riscv.cpu tap/device found: 0x10e31913 (mfg: 0x489 (SiFive, Inc.), part: 0x0e31, ver: 0x1)
halted at 0x80000004 due to software breakpoint
Start address 0x20400000, load size 18866
Transfer rate: 42 KB/sec, 1886 bytes/write.
A debugging session is active.
Inferior 1 [Remote target] will be detached.
Quit anyway? (y or n) [answered Y; input not from terminal]
[Inferior 1 (Remote target) detached]
shutdown command invoked
Info : dropped 'gdb' connection
But now I can’t flash again any program and I got the same error than Balaji :
$ west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner hifive1
Open On-Chip Debugger 0.10.0+dev-01508-gf79c90268-dirty (2021-03-26-16:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
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: 0x10e31913 (mfg: 0x489 (SiFive, Inc.), part: 0x0e31, ver: 0x1)
Error: Timed out waiting for debug int to clear.Increase timeout with riscv set_command_timeout_sec.
Error: Debug interrupt didn't clear.
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xfb5dfffe
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Error: Failed to discover xlen; word0=0xfff04493, word1=0x1f4d493, exception=0x60c1218
Error: Debug RAM 0x0: 0xfff04493
Error: Debug RAM 0x1: 0x01f4d493
Error: Debug RAM 0x2: 0x40902023
Error: Debug RAM 0x3: 0x01f4d493
Error: Debug RAM 0x4: 0x40902223
Error: Debug RAM 0x5: 0x3f00006f
Error: Debug RAM 0x6: 0x060c1218
Error: Debug RAM 0x7: 0xfb5dfffe
Error: Debug RAM 0x8: 0x00000000
Error: Debug RAM 0x9: 0x00000000
Error: Debug RAM 0xa: 0x00000000
Error: Debug RAM 0xb: 0x00000000
Error: Debug RAM 0xc: 0x00000000
Error: Debug RAM 0xd: 0x00000000
Error: Debug RAM 0xe: 0x00000000
Error: Debug RAM 0xf: 0x00000000
Warn : target riscv.cpu examination failed
Info : starting gdb server for riscv.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: Target not examined yet
localhost:3333: Connection timed out.
You can't do that when your target is `exec'