hi all I am working with keil ide. And cygnal 8051f120,my compiler version is 7.20, I am facing some problems with the optimization .my code size is above 36 kb, when I use optimization level default (8) the float values and long values are giving me wrong results even for simple addition .this error is highly sensitive to optimization. if decrees the optimization this error some times the error is there some times the error is not there, please help me out hari
Are you sure that the problem is actually caused by the optimisation? Are you sure that it's not just that the optimisation happens to bring out some other latent bug in your code?
dear neil i am sure that there no error or bug in that part of code because i am not doing any thing other than simple addition to variable that are showing these undesired values if i put optimization level 3, these errors are not coming Thanks for your replay hari
Some bits of information would be helpful, like: - the actual source code in which the error occurs. - what the false result is (is it always the same or does it change) - are there any ISRs running at the same time as the operation that return the false results.