Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21607 Discussions

Print Nios II Console

Altera_Forum
Honored Contributor II
2,031 Views

I am outputing a large amount of debug data to he NIOS II console and need to be able to check this . Is there a way of saving the contents of the console to a file or print it out. 

 

All help would be appreciated
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
780 Views

you can try nios2-terminal > log.txt

0 Kudos
Altera_Forum
Honored Contributor II
780 Views

It is fine, i need to log some data from my board.  

And was it possible to make some script, which can to log the data from jtag uart to one file every maybe 5 minutes ?  

I mean every 5 minutes it creates one file ... log0905.txt at 9:05, log0910.txt at 9:10 ...etc.
0 Kudos
Altera_Forum
Honored Contributor II
780 Views

Hi all, 

 

my colegue make this script, which work (every 10 minutes save one log file) 

------------------------- 

 

# !/bin/sh 

x=0 

while [ 1 ] ; do 

echo 'begin save data...' 

nios2-terminal > ukladam$x.csv &  

sleep 600 

echo 'end saving data...' 

# kill nios2-terminal 

ps -ef | grep "nios2-terminal" | awk '{print $2}' | xargs kill 

# increment variable 

x=$(($x+1)) 

done 

---------------------- 

Now it works ! :) 

 

Jan Naceradsky
0 Kudos
Reply