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

printf() ??

Hi, 

I am fairly new to programming FPGAs and using the NIOS II. I am using the DE0 Nano development board and I am just curious, how exactly is the printf() function able to send messages to the console window on the computer from the development board? I thought that the communication is only one way, from computer to DE0 Nano when programming the device and debugging. I read somewhere that in order to allow two-way communication , a USB-UART bridge converter is needed. How exactly is printf() working in this case? Many thanks in advance.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
33 Views

Hi printf() prints to stdout which is defined to an UART in Board Support Package (or system library for old nios system) linked to the Qsys component (or SOPC for old nios system) 

 

In eclipse, you can follow the printf() function but it becomes hard to understand. 

 

 

NB : With JTAG_UART, you must keep a nios2-console connected to receive the bytes sent by your board, else you will face to hang problems. 

Someones prefer to write to stdout with low level functions. 

 

EDIT: JTAG UART is already duplex : you can send and receive characters. 

You only need to use USB-RS232 if you don't have RS232 on your PC.
Altera_Forum
Honored Contributor I
33 Views

The data is sent up through the JTAG interface.

Reply