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++

printf() ??

Altera_Forum
Honored Contributor II
1,479 Views

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 II
785 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.
0 Kudos
Altera_Forum
Honored Contributor II
785 Views

The data is sent up through the JTAG interface.

0 Kudos
Reply