Forum Discussion
Altera_Forum
Honored Contributor
12 years agoC code freezes/Pauses while execution
I have a C application in which I have two adjacent print statements. But only the top one is printed and not the second one. What could be reason. My C code is quiet bigger and complex in size. I...
Altera_Forum
Honored Contributor
12 years agofflush() is declared in <stdio.h> Not sure what your problem is compiling with it.
Your screenshot shows garbage characters in the output after "hi". Your screenshot also shows this is a multi-core project. Those two facts make me think that your problem is more likely something like memory corruption causing the progrm you are trying to debug to crash, or possibly multiple cores accessing the same serial port? I would try the basic debugging technique of removing large chunks of code until your printf()'s start working again to get an idea of where the issue might be. I would start with just a single core executing.