Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

printf does not display in the console

Hi All,

I am trying to get the cycloneiii_3c25_start_niosii_standard reference design files to run on the cyclone iii starter kit.

The problem that i have is that once the Nios ii project is built and run on the board printf does not display anything to the console.

The code is as simple as can be:


# include <stdio.h>
int main()
{
   printf ("hello from Nios II!\n");
  return 0;
}

I have seen that other people have made posts regarding this problem.

I have checked that stdout is set to jtag_uart in the system library properties.

in the debug window i see a message:

<terminated, exit value :0> Nios II download output (dd/mm/yy hh:mm)

It has been recommended in other that i should debug with breakpoints at alt_main() but i dont seem to be able to navigate to alt_main.c from Nios II IDE within my workspace.

Even a search doesn't find it.

Using windows explorer i find alt_main.c in nios2eds\components\altera_HAL\src

I havent edited the SOPC reference design or the Nios II reference design so i would have assumed any problem would be a simple config issue.

Any advice would be greatly appreciated.

Thanks in advance.

Ade

15 Replies