Forum Discussion

Bar's avatar
Bar
Icon for New Contributor rankNew Contributor
3 years ago
Solved

using fprintf with stdout parameter in NIOS2

Hello.

If I want to write alternative output string to JTAG_UART and NIOS_UART can I use the function fprintf using the distenation as the first parameter?

Is it possible to chose the stdout during run or it must be define fix, and if I can what should be the parameter to place in for JTAG_UART & NIOS_UART?

Thanks

  • Hi,

    Any updates from your end whether the feedback provided was useful?


    Thank you.


    Regards,

    Kelly


4 Replies

  • KellyJialin_Goh's avatar
    KellyJialin_Goh
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    Greetings and welcome to Intel's forum.


    Yes, you are able to write alternate output string to JTAG_UART and NIOS_UART.

    Here is an example writing to uart1 for your reference: https://www.intel.com/content/www/us/en/docs/programmable/683525/17-0/introduction.html (Section 7.7.2. General Access to Character Mode Devices)

    Unfortunately, you are unable to choose the stdout during run time so you will have to set it first.


    Hope this clarifies your doubts.


    Thank you.


    Regards,

    Kelly Jialin, GOH



  • KellyJialin_Goh's avatar
    KellyJialin_Goh
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    Any updates from your end whether the feedback provided was useful?


    Thank you.


    Regards,

    Kelly


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

      Yes it work.

      Thanks

  • KellyJialin_Goh's avatar
    KellyJialin_Goh
    Icon for Frequent Contributor rankFrequent 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’, 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.


    p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

    Thank you.


    Regards,

    Kelly Jialin, GOH