[ABANDONED] J-Link EDU hangs at "Starting target CPU" when debugging software on SiFive E300ArtyDevKits

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] J-Link EDU hangs at "Starting target CPU" when debugging software on SiFive E300ArtyDevKits

    Hello,
    I’m trying to test the FE310 softcore on Arty Artix-7 35T board with some programs with J-Link EDU. I followed carefully the instructions from wiki.segger.com/SiFive_Arty_FPGA_Dev_Kit for the hardware connection and freedom studio setup. The default program coupled with the bitstream works fine. However, when I tried to download with J-link a new RISV-V program (e.g. the drhystone example), the following error appeared:

    SEGGER J-Link GDB Server V6.33g (beta) Command Line Version
    JLinkARM.dll V6.33g (DLL compiled Jun 28 2018 15:09:48)
    Command line: -if jtag -device RISC-V -endian little -speed 4000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    Generate logfile: off
    Verify download: on
    Init regs on start: on
    Silent mode: off
    Single run mode: on
    Target connection timeout: 0 ms
    ------J-Link related settings------
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ------Target related settings------
    Target device: RISC-V
    Target interface: JTAG
    Target interface speed: 4000kHz
    Target endian: little
    Connecting to J-Link…
    J-Link is connected.
    Firmware: J-Link V10 compiled Jun 27 2018 10:57:29
    Hardware: V10.10
    S/N: 260109090
    OEM: SEGGER-EDU
    Feature(s): FlashBP, GDB
    Checking target voltage…
    Target voltage: 3.27 V
    Listening on TCP/IP port 2331
    Connecting to target…
    J-Link found 1 JTAG device, Total IRLen = 5
    JTAG ID: 0x20000001 (RISC-V)
    Connected to target
    Waiting for GDB connection…Connected to 127.0.0.1
    Reading all registers
    Reading register (PC = 0x00000000)
    Received monitor command: speed 4000
    Target interface speed set to 4000 kHz
    Received monitor command: clrbp
    Received monitor command: reset
    Resetting target
    Received monitor command: halt
    Halting target CPU…
    …Target halted (PC = 0x404002CA)
    Received monitor command: regs
    X0 = 00000000, X1 = 4040010A, X2 = 8000FFE0, X3 = 800007C0
    X4 = 00000000, X5 = 00000000, X6 = 00000010, X7 = 404007C0
    X8 = 01484812, X9 = 00000000, X10= 01484817, X11= 00000000
    X12= 014849A2, X13= 00000000, X14= 000000FF, X15= 00000000
    X16= 0200C000, X17= 00000000, X18= 02000080, X19= 00000000
    X20= 00000000, X21= 00000000, X22= 00000000, X23= 00000000
    X24= 00000000, X25= 00000000, X26= 00000000, X27= 00000000
    X28= 20005000, X29= 0000002F, X30= 000000FF, X31= 00000000
    PC = 404002CA
    Reading register (PC = 0x404002CA)
    Received monitor command: speed 4000
    Target interface speed set to 4000 kHz
    Received monitor command: flash breakpoints 1
    Flash breakpoints enabled
    Reading all registers
    Downloading 108 bytes @ address 0x40400000 - Verify failed
    Downloading 2534 bytes @ address 0x4040006C - Verify failed
    Downloading 59 bytes @ address 0x40400A54 - Verify failed
    Downloading 44 bytes @ address 0x40400A90 - Verify failed
    Downloading 1072 bytes @ address 0x40400ABC - Verify failed
    Writing register (PC = 0x40400000)
    Reading register (MISA = 0x40101105)
    Read 2 bytes @ address 0x40400552 (Data = 0x2020)
    Received monitor command: clrbp
    Received monitor command: reset
    Resetting target
    Received monitor command: halt
    Halting target CPU…
    …Target halted (PC = 0x404002CA)
    Reading register (PC = 0x404002CA)
    Reading all registers
    Reading 64 bytes @ address 0x01484800
    WARNING: Failed to read memory @ address 0x01484800
    Read 4 bytes @ address 0x0148480E (Data = 0x24232423)
    Reading 64 bytes @ address 0x01484800
    WARNING: Failed to read memory @ address 0x01484800
    Read 4 bytes @ address 0x0148480E (Data = 0x24232423)
    Reading 64 bytes @ address 0x01484800
    WARNING: Failed to read memory @ address 0x01484800
    Read 4 bytes @ address 0x0148480E (Data = 0x24232423)
    Reading 64 bytes @ address 0x01484800
    WARNING: Failed to read memory @ address 0x01484800
    Read 4 bytes @ address 0x0148480E (Data = 0x24232423)
    Reading 64 bytes @ address 0x01484800
    WARNING: Failed to read memory @ address 0x01484800
    Read 4 bytes @ address 0x0148480E (Data = 0x24232423)
    Read 2 bytes @ address 0x40400552 (Data = 0x2020)
    Received monitor command: regs
    X0 = 00000000, X1 = 4040010A, X2 = 8000FFE0, X3 = 800007C0
    X4 = 00000000, X5 = 00000000, X6 = 00000010, X7 = 404007C0
    X8 = 01484812, X9 = 00000000, X10= 01484817, X11= 00000000
    X12= 014849A2, X13= 00000000, X14= 000000FF, X15= 00000000
    X16= 0200C000, X17= 00000000, X18= 02000080, X19= 00000000
    X20= 00000000, X21= 00000000, X22= 00000000, X23= 00000000
    X24= 00000000, X25= 00000000, X26= 00000000, X27= 00000000
    X28= 20005000, X29= 0000002F, X30= 000000FF, X31= 00000000
    PC = 404002CA
    Reading register (PC = 0x404002CA)
    Setting breakpoint @ address 0x40400552, Size = 2, BPHandle = 0x0001
    Starting target CPU…

    And it just stuck at Starting target CPU… and apparently the program was not flashed to QSPI Flash as I pushed the reset button.
    I can't find why download verify failed as shown in the log.
    Could someone please help shed some lights?

    Thanks
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Are you using the same debug config for your custom project?
    Does your project run in QSPI Flash? If so did you disable option "Set program counter at" as suggested in the Wiki?
    Can you run the example projects when slightly changing the code?
    Could you provide us with an example project for reproduction purposes?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    I'm sure I followed strictly each and every step in wiki.segger.com/SiFive_Arty_FPGA_Dev_Kit

    The project run was
    Disable "set program count at"??? The wiki asked for ENABLE this option and put the address at 40400000! Anyway, I tried both ENABLE and DISABLE and same outcome!

    I ran also the dhrystone example in Freedom Studio and result was the same error stuck at Starting target cpu......

    Reading the log, Jlink can read all 32 registers but failed to verify download.

    Very frustrating to pinpoint the cause.

    Best regards,
    Albert

    The post was edited 1 time, last by albertliuster ().