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

Problem with printf

Altera_Forum
Honored Contributor II
996 Views

Hi, 

 

I have a Cyclone development board and am useing the jtag interface for printf statements in my code. I also have a UART sending and receiving characters and use the uCosII operating system. 

 

At some specific point in my code I have a printf statement that seems to mess up the system. Other printf statements are functioning fine.  

The following happens: 

 

I am sending and receiving messages on the UART and when I send a specific message (with the printf statement following) the interrupts are not handled anymore. I can step thorugh the alt_irq_handler and see the interrupt flags for the alt_avalon_timer_sc_irq and the altera uart. However the address of the interrupt routines are not the actual addresses so the interrupts are not handled anymore, freezing up the system. 

 

When I remove the printf statement all functions well. When I change the printf statement the problem seems to change as well: interrupts are handled but the signal flag for receiving characters does not arrive in the place I am pending for it (receive blocking) so the buffer is filled with characters but te receive function is still pending. 

I use the standard altera HAL receive routines, only have I extended the buffer size from 64 to 256. 

 

I do not use printf in interrupt routines. 

 

What might be the problem? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
0 Kudos
0 Replies
Reply