Forum Discussion
Altera_Forum
Honored Contributor
15 years agoprintf 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. Ade15 Replies
- Altera_Forum
Honored Contributor
sorry cris this is a red herring - using this mechinism actually worked, the problem i have is when i DO use a jtag debug module with the larger platform nios project.
I tried running this project in all of the memory locations in the design, but still no joy. Thanks. - Altera_Forum
Honored Contributor
One question; maybe is just a matter of visualization in the sopc builder picture you posted, since I can't see the complete system.
I see that altmemddr clock is system_clk but ddr is mastered by the altmemddr_bridge with altmemddr_clk. I think this is not correct. You should use altmemddr_clk for ddr, too. Otherwise, why do you need to use the clock crossing bridge? - Altera_Forum
Honored Contributor
Hi digital_ade:
I meet the same problem with you,can you give me some advices? - Altera_Forum
Honored Contributor
Hi i have some what similar problem. No output on the console from printf. during debug it hits breakpoints and returns from printf() call, but there is no out put. Quartus v15. where in Qsys do you verify/change the reset vector ?
- Altera_Forum
Honored Contributor
--- Quote Start --- Hi i have some what similar problem. No output on the console from printf. during debug it hits breakpoints and returns from printf() call, but there is no out put. Quartus v15. where in Qsys do you verify/change the reset vector ? --- Quote End --- Reset vector is chosen under the Parameters tab for the NIOS. It is in the Vectors sub-tab. -Matt