Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
793 Views

Nios 2 communication without using nios2-terminal

Hello, 

I have a board with a NIOS 2 processor connected to a Lnux PC through a USB Blaster cable. 

I know all the commands for the NIOS 2 and I can communicate from the Linux PC using the nios2-terminal. 

 

However I need to create an external application (in the Linux host PC) that communicate with Nios 2 in order to create a go-no-go GUI tester application that check the boards FPGAs. 

 

Is it possible to create such communication without using the nios2-terminal? 

I mean a c/c++ based application that perform direct communication with the Nios 2 processor through the USB Blaster cable connection. 

 

Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
57 Views

Most dev boards have a serial connection as well as the USB blaster. Usually these are an FTDI or similar serial to USB converter chip. Connect a USB cable from that port to your computer. The port will usually show up in the linux /dev directory. Hint: Do "ls /dev" before and after connecting the cable. The entry that appears when the cable is connected is your serial device. Use standard linux seral port programming from there. Another hint: The command "stty < /dev/<whatever>" will tell you the baud rate etc that the port is set to.

Altera_Forum
Honored Contributor I
57 Views

Since you're using a Linux host, you could also simply use popen() around nios2-terminal  

 

Depending on the scope of your application, you could probably also accomplish the same task via the dashboard GUI elements (Tcl/Tk) in System Console.
Altera_Forum
Honored Contributor I
57 Views

Hello Galfonz, Thanks for your replay. 

 

I have a USB Blaster download cable which is connected to the board with a 10 pin connector and to the host side with USB connection. 

When I connect the cable I only can see a USB connection and there is no serial connection, both in Linux and in Windows 7. 

There is any option to set it as serial port? 

 

Thanks, 

Gabriel.
Reply