Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFWIW, I resolved this issue using the netcat program (nc on the command line) which has a nifty feature of creating a tcp server that attaches to the stdin and stdout of nios2-terminal. Once the following Bourne shell script is running (passing command line argument --instance 1 on my system that has two jtag uarts) on the local host I can attach gdb with "target remote localhost:5107". I used the open-bsd version of netcat.
# !/bin/sh cleanup () { kill %nc rm netcatout rm netcatin exit } trap cleanup int quit abrt segv bus ill pipe mkfifo netcatout mkfifo netcatin nc -l 5107 -k > netcatout < netcatin & while [ 1 ] do nios2-terminal $@ --quiet --flush < netcatout > netcatin echo restarting nios2-terminal done cleanup ()