Forum Discussion

KennyJoosen's avatar
KennyJoosen
Icon for New Contributor rankNew Contributor
1 year ago
Solved

Nios V starts in debugging mode, but not in stand-alone mode

I have migrated a working Nios II/f instance to a Nios V/g one.

When launching a debugging session with RiscFree IDE and JTAG to this Nios V instance, everything operates as expected. However, when running the image with this Nios V instance, the application does not start (at the start log messages should appear, but those are not visible with the JTAG UART terminal).

I have followed the migration guide, but I am probably missing something. Do you have any pointers for me to look at?

  • I found the cause of the issue: the conversion of the ELF file to HEX file went wrong. I was using elf2flash and riscv32-unknown-elf-objcopy commands, while I should have been using the elf2hex command.

    Conversion command used now:

    elf2hex ${PROJECT_ELF} -o ${PROJECT_HEX} -b 0x00000000 -e 0x0007ffff -w 32 -r 4

5 Replies

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    The uart terminal NiosV command is different compared to NiosII.

    Are you using the juart-terminal command for the NiosV uart?


    Besides that, have you tried creating a simple hello world in the NiosV?


    Regards

    Jingyang, Teh



    • KennyJoosen's avatar
      KennyJoosen
      Icon for New Contributor rankNew Contributor

      Hi,

      I am using the juart-terminal command. When launching my application in debug mode with the RiscFree IDE, logging appears on the juart-terminal as expected and the application behaves as expected.

      However, the Nios V application doesn't seem to start when being part of the FPGA image and no debugger is attached/launching it, since no logging appears on the juart-terminal (first lines that should be executed in the code) and application seems unresponsive/behaves not-expected (seems to do nothing).

  • KennyJoosen's avatar
    KennyJoosen
    Icon for New Contributor rankNew Contributor

    I found the cause of the issue: the conversion of the ELF file to HEX file went wrong. I was using elf2flash and riscv32-unknown-elf-objcopy commands, while I should have been using the elf2hex command.

    Conversion command used now:

    elf2hex ${PROJECT_ELF} -o ${PROJECT_HEX} -b 0x00000000 -e 0x0007ffff -w 32 -r 4
  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



    Regards

    Jingyang, Teh