Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17256 Discussions

nios2 ubuntu printf problem

Altera_Forum
Honored Contributor II
2,067 Views

Hello, 

I am facing with a problem when using eclipse-Nios2 on ubuntu. I have 10.1 version of nios2. even within the simplest hello world software i cannot get anything out of the "printf" function. I tried adding a line of "fflush(stdout);" after printf as suggested in some forums. But it didn't help.  

Does anyone know what would be the problem and how to solve it? 

By the way, I tried with alt_printf, alt_putstr and many others, none of them worked :(
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
945 Views

are you using a custom hardware design or a ready made one? Are you sure the nios2 terminal is active and connected to the target?

0 Kudos
Altera_Forum
Honored Contributor II
945 Views

hi Daixiwen, 

thanks for your answer.  

i'm using a custom hardware design. what to do you mean by the activation of nios2-terminal?
0 Kudos
Altera_Forum
Honored Contributor II
945 Views

by the way the design and also the printf command works perfect on nios2 on windows. it is only the problem of the version of the ubuntu.  

anyone has any idea?
0 Kudos
Altera_Forum
Honored Contributor II
945 Views

Check in Eclipse that it is set up correctly to open a nios2 terminal after the software has been uploaded to the nios2. Does the upload work without any errors?

0 Kudos
Altera_Forum
Honored Contributor II
945 Views

When I run the software I got errors like 

 

"An exception occurred while dispatching debug events." 

"The proxied handler for "com.altera.sbtgui.project.commands.SystemConsoleHandler' could not be loaded" 

"An exception stack trace is not available." 

"CPU master group not set." 

"CPU architecture type not set." 

"The SOPC design does not contain a CPU of a supported architecture." 

"CPU module not set." 

"SOPC design not set." 

 

Since the software works except printing the register values, I didn't care for these errors. Can the second error be related with the printing problem?
0 Kudos
Altera_Forum
Honored Contributor II
945 Views

I've never seen those error messages so I've no idea where they come from. If eclipse can't launch a terminal to communicate with the JTAG Uart, try to run it from a separate terminal window (nios2-terminal from any shell prompt)

0 Kudos
Altera_Forum
Honored Contributor II
945 Views

Hi, 

I am having the same errors. 

Have you solved the problem? 

How did you solve it? 

Thank you
0 Kudos
Reply