Forum Discussion

Balerion's avatar
Balerion
Icon for Occasional Contributor rankOccasional Contributor
5 months ago
Solved

Nios-V .elf download failure

Hi all,
I am trying to download two simple Nios-V apps using RiscFree IDE to my target boards. One of my board has Cyclone-V and the other has Arria-10. My main.cpp files are same but their BSPs are different since boards are different. My app is so simple such that it has a printf printing hello world from jtag uart. However, I am not able to download it to the target. It gives me error as written below, when I try to download it to the board that has Arria-10

--------------------------------
Initializing connection...
Cannot set the JTAG Frequency, continuing with auto adjust mode.
Error occured during enumeration of RISC-V harts(no hart found).

--------------------------------
When I try to download the other app to Cyclone-V it also gives me error the

---------------------------------
Initializing Connection ...

Unable to setup adaptive clock.

Internal error. Couldn't halt the target timeout occured.

Error occured attempting to halt the target during discovery.

---------------------------------

I don't know what the problem are. Could you please help me about that.

Sincerely,

Balerion

  • Hi Balerion,

    When you are able to download the elf using the --go command, it is likely that your setup on the board is correct already

    There is an update by the way. I tried the command

    *****************************************************************
    "niosv-download.exe app.elf --go"

    -> Hello Nios V World!

    *****************************************************************

    And you saw this error when trying to connect with RiscFree

    Initializing connection ...
    Cannot set the JTAG frequency, continuing with auto adjust mode
    Connected to target device with IDCODE 0x2e240dd using USB-Blaster-2 (1) via JTAG at 24.00MHz.
    Info : Active Harts Detected : 1
    Info : Core[0] Hart[0] is in halted state
    Info : [0] System architecture : RV32
    Info : [0] Number of hardware breakpoints available : 1
    Info : [0] Number of program buffers: 8
    Info : [0] Number of data registers: 2
    Info : [0] Memory access -> Program buffer
    Info : [0] Memory access -> Abstract access memory
    Info : [0] CSR & FP Register access -> Abstract commands

    Waiting for debugger connection on port 56767.
    Press 'Q' to Quit.

    This could be your RiscFree's setting or your host system's setting not set correctly.

    Likely Root Causes
    GDB Server launched by risc free failes to connect IDE cannot detect the prompt (gdb) migh due to the following

    a) Firewall/antivrus is blocking the local host port access

    b) IDE times out before connection is established

    c) There is a mismatch in how the debug config launches

    Possible Fix

    a) Temporarily disable antivirus / firewall

    b) Try launch RiscFree as administrator

    c) Increase debugger timeout (if IDE allows)

    Please let me know the result after you try the step and provide screenshot if possible.

    Regards,

    Boon Khai

28 Replies