Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

close or change dynamicly the stdout in arria 10

Bar
Novice
834 Views

Hello.

I want to block printf to my stdout driver which point to JTAG_UART set in the BSP editor. I try several options

 int file_dsc;
file_dsc = open("/dev/jtag_uart", O_RDONLY);

this way I was thinking that it can't write and printf doesn't go out.

I also after it this:

close(file_dsc);

to close the driver so printf doesn't go to output driver.

But for both of them I see print sin my terminal.

Is it possible to close it at all, and if so which function could do it?

Alternative if there is no function to do so I think on onther solution.

Is there a way in the code during run, to change the driver of stdout from JTAG_UART to NONE and back?

attach 2 pic of the setting I need.

Thanks

Bar.

0 Kudos
1 Solution
KellyJialin_Goh
Employee
744 Views

Hi,

I don't think we have any functions for this as usually, we would want to avoid printf blocking to the output terminal.

Hope this clarifies your doubts.


Thanks.


Best,

Kelly


View solution in original post

0 Kudos
5 Replies
KellyJialin_Goh
Employee
802 Views

Hi,

Greetings and welcome to Intel's forum.


I assume you mean to stop the printf to stdout driver for jtag_uart. I will attach a screenshot.


However, you are unable to change the driver of stdout from JTAG_UART to NONE and back during run time.


Thank you.


Regards,

Kelly


0 Kudos
KellyJialin_Goh
Employee
779 Views

Hi,

Attached is a screenshot to stop printf to stdout driver for jtag_uart by choosing none.

KellyJialin_Goh_1-1684389804630.png

 

Thank you.

 

Regards,

Kelly

0 Kudos
Bar
Novice
765 Views

Thanks Kelly.

The setting I know. but if I want to stop printing while I run why the close() (as in NIOS command), or fclose() (as in standart C) doesn't stop the printing (no metter which is the stdout? Is there onther command that I can use for stoping printng?

Regards

Bar.

0 Kudos
KellyJialin_Goh
Employee
745 Views

Hi,

I don't think we have any functions for this as usually, we would want to avoid printf blocking to the output terminal.

Hope this clarifies your doubts.


Thanks.


Best,

Kelly


0 Kudos
KellyJialin_Goh
Employee
682 Views

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


0 Kudos
Reply