Forum Discussion
Altera_Forum
Honored Contributor
18 years ago --- Quote Start --- originally posted by estellrum@Mar 28 2007, 08:38 AM i have a problem with the printf function,
# include <stdio.h>
int main()
{
printf("hello from nios ii!\n");
return 0;
}
that is the simple program that i tried to run, however the printf function did not print the sentence to the console, i am using the nios2 ide.
does anyone know why it doesnt display the printf sentence?
the console remains as this:
nios2-terminal: connected to hardware target using jtag uart on cable
nios2-terminal: "usb-blaster [usb-0]", device 1, instance 0
nios2-terminal: (use the ide stop button or ctrl-c to terminate)
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=22588)
--- quote end ---
--- Quote End --- The printf use stdout as the output channel, so one possible cause is that there is no stdout device in the system, you can check this by selecting you project in Nios IDE's Project Navigation panel, right click "System Library Properties". If no stdout device is there, a common solution is to add a JTAG_UART device into your system in SOPC Builder.