Forum Discussion

allenS1's avatar
allenS1
Icon for New Contributor rankNew Contributor
2 years ago

Nios II "Hello World" project not printing to stdout

Hello,

I'm trying to run a simple "Hello World" program on Nios II.

I'm following these steps: https://www.intel.com/content/dam/support/us/en/programmable/support-resources/fpga-wiki/asset02/nios-ii-hello-world-a10.pdf

I've made to through all the steps of creating the design in platform designer, compiling, programming the design to the board (DE10-Lite), generating the BSP, and building the project in Eclipse with no issue. Even when I run the hardware configuration, I get no errors, but nothing prints to the Nios II Console. I've tried running a simple math program in the debugger, and it seems like the Nios CPU is executing instructions, but when it comes to printing to stdout, nothing shows up. When I open the run configuration window in the Target Connections section, I get the message "The expected Stdout device name does not match the selected target byte stream device name." How can I find the stdout device name? How can I find the selected target byte stream device name? How can I change either of these so that they match? I'm not sure how to fix this error or if it is even the source of why nothing is printing to stdout, but it's all I have right now. I'm using Quartus Lite Version 22.1

Any help is appreciated. Thanks.

9 Replies

  • sstrell's avatar
    sstrell
    Icon for Super Contributor rankSuper Contributor

    Show your BSP settings. Did you add the jtag UART component in Platform Designer?

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

    Hello,

    Yes I added the jtag uart to Platform designer. Here is the design:

    I've attached the bsp settings as well. Here is the memorymap:

    And here is the stdout device:

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

    Hi there,

    Any other suggestions? I still haven't debugged the issue.

    Thanks

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

    Hi allenS1,


    Do you still require help regarding the matter?


    Thanks.

    Regards,

    Aik Eu


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

    Hello there,

    Yes I'd still like help with this matter. Thanks.

    Best,

    allens1

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

    Hi allenS1,


    Did you use the juart-terminal to perform the operation?

    Here I tested with NiosV hello world. You can download the design from the below:

    https://www.intel.com/content/www/us/en/design-example/812556/arria-10-fpga-hello-world-on-the-nios-v-g-processor-design-example.html


    First program the .sof file of the design to the FPGA.

    Then run the NiosV command shell. (niosv-shell)

    Then download the hello worl application file into the design in the ready_to_test_file folder. (niosv-download app_hal2.elf)

    Then perform:

    niosv-download -g

    niosv-download -r

    juart-terminal


    You will able to see the Hello world application running.


    Thanks.

    Regards,

    Aik Eu


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

    For your current design screenshot from your previous comment.

    I think you didnt connect the data_master to the juart Ip

    Thanks.

    Regards,

    Aik Eu

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

    Hi there,

    I connected the data_master to jtag ip and I can see the "Hello World" printing to the console. Thanks so much!

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

    Hi allenS1,


    Glad that the issue has been resolved. I will close the thread for now.


    Thanks.

    Regards,

    Aik Eu