Altera_Forum
Honored Contributor
15 years agoSerial I/O runtime keeps crashing!
Hello, I have a Nios II system with two UARTs, both of which have worked perfectly fine for a while... Then I made a couple of unrelated changes to my Quartus design (outside the Nios system), and ever since then, my Nios code has been crashing (hanging or restarting) somewhere in the serial I/O libraries or system runtime, at unpredictable times, but usually within the first 10 or 100 calls to serial I/O library functions (fprintf(), fgets(), etc.)
Unfortunately, I cannot pinpoint the cause of the problem in the Nios II IDE debugger, because it doesn't seem to include debuggable versions of the system runtime - I can step through the outer layers of the STDIO libraries, but not e.g. into read(), which is one of the places where it's crashing. What I was wondering is the following: 1) Is it possible that changes to the outside design could shift placement/routing in ways that cause subtle timing glitches within the Avalon UART core IP to manifest themselves? If so, it's disappointing that the IP is so fragile... and I'm not sure how to fix it, except by backing off to the last known working version of the Quartus design... 2) How does one usually debug or workaround these kinds of problems? It's very frustrating, because the code crashes in a different place each time, and I can't even step into the point where it's crashing with the source-level debugger. I don't have source code for the system runtime or the megafunction IP. (Or is there some way to get it?) Thanks for any advice, -Mike