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

Nios 2 communication without using nios2-terminal

Altera_Forum
Honored Contributor II
1,070 Views

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 II
334 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.

0 Kudos
Altera_Forum
Honored Contributor II
334 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.
0 Kudos
Altera_Forum
Honored Contributor II
334 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.
0 Kudos
Reply