Hi! First thanks for your help. I found the reason for this strange behaviour. There was an uninitialised enum-type variable in my C code. I was porting software from Windows to DSP and the behaviour of the TI-compiler sometimes is a little bit different from Microsoft's one. For example in this case the Microsoft-compiler did the initialisation by itself, the TI-compiler did not. So I had created some kind of random everytime I changed the printf-statements for debugging D. Puchowski > > printf > > 1. For real-time debugging, use LOG_printf > 2. Even if it isn't a timing issue, if you have optimisation switched on, LOG_printf or printf can change the way the optimiser works, if there is a bug in the optimiser, it can change the behaviour. Best to get the code working without optimisation first. > Roger Kingsley > > Date: Mon, 07 Feb 2005 07:15:41 -0500 > From: > Subject: Printf influences code? > > Hi, > I have some strange problems with my DSP programm. For debugging I use the printf-function. The fwrite/fread-functions are also used for providing some process data. > The problem I have is, if I add or remove some printf statements, the results of some calculations are different. How can printf influence the behavior of my code? > If someone has any ideas, please tell me! > Puchowski |