Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

printf() ??

Honored Contributor II


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
Honored Contributor II

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.
Honored Contributor II

The data is sent up through the JTAG interface.