Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12410 Discussions

How to save Nios II console contents.

Altera_Forum
Honored Contributor II
1,402 Views

In the NIOS EDS environment I need to save the contents of 

the NIOS console which displays the output of the 

printf statements. I have tried to copy from the window and  

paste into another program but it does not work. 

It is possible to redirect the window output to a file ? 

 

Thanks in advance for the help
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
334 Views

I'm not sure but I do this a lot from the command line by downloading my code using nios2-download -g -r <elf file> and then I fire up a terminal with nios2-terminal. If you have a board with multiple devices on the JTAG chain, or multiple Nios/UARTs, or cables then there are more arguments to pass in so check out the help commands for those two to figure that out. 

 

If you want to dump the terminal to a file then it's just nios2-terminal >> my_file.txt which dumps the outputs to the file. >> is a standard linux command so you can google around to find out more about it.
Altera_Forum
Honored Contributor II
334 Views

I realize this is an old thread, but thought I would comment in case it is helpful for someone else. 

 

If you want to copy from the Nios II Console and then past to a text editor , you can try this to see if it works... 

 

save printf output from nios ii console: 

• Currently using Eclipse from Quartus Prime 17.0. Not sure if this works in other versions. 

• I have not found this documented anywhere, just found it by trial and error. 

• Prior to clicking the run button, kill the Nios II Console window if it is open. It will re-open when it starts running. 

• During/after run has executed, select text in Nios II Console window. 

• Select Ctrl-Insert key combination. It should now be copied to the clipboard. 

• Paste with Ctrl-v. 

• This only seems to work once. Must kill window and re-run to do another copy/paste.
Reply