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

JTAG UART crashes NIOS if no NIOS terminal is open

Altera_Forum
Honored Contributor II
1,411 Views

Hi 

 

So, Nios was "crashing" for me. In truth, it just seemed to be dormant. As soon as I connected the Nios terminal, it magically came back to life, and some printf stuff got flushed out onto the Nios terminal. 

Anybody seen this before? 

 

I am guessing that the JTAG UART FIFO filled up. Should I really expect that Nios should simply carry on in its merry way regardless, or should it stop like this? 

 

Thanks 

 

Clive
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
526 Views

Hi clivewmwalker, 

 

id you solve this issue? I have the same problem. Thanks in advance. 

 

Marco
0 Kudos
Altera_Forum
Honored Contributor II
526 Views

 

--- Quote Start ---  

Hi 

 

So, Nios was "crashing" for me. In truth, it just seemed to be dormant. As soon as I connected the Nios terminal, it magically came back to life, and some printf stuff got flushed out onto the Nios terminal. 

Anybody seen this before? 

 

I am guessing that the JTAG UART FIFO filled up. Should I really expect that Nios should simply carry on in its merry way regardless, or should it stop like this? 

 

Thanks 

 

Clive 

--- Quote End ---  

 

 

Working form memory there are different options when instantiatiating a JTAG UART which deternine if it is used for interacting with a human, or just for communicating with another device, and depending on these options there is a bit in the JTAG UART's control register that can be used by the device driver to determine if a terminal is attached. Depending on the application the software might choose to throw away some of the output characters if no terminal is attached, with the explicit purpose being to prevent a thread in the software from blocking when no terminal is attached.
0 Kudos
Altera_Forum
Honored Contributor II
526 Views

I am seeing this problem with Quartus 14.1/16 versions. 

When I send data on uart with nios2-terminal not started, after a while NIOS stalls. 

Additionally, verified that DALTERA_AVALON_JTAG_UART_SMALL is not used in this case, which means full fledged driver with character drop is running. 

It does not look to be related to buffer size, as I could print characters more than the buffer could hold. 

Any input is well appreciated.
0 Kudos
Reply