I warn anybody before using ARM Keil 4.13a. It generates defective code. I have spent several hours with debugging a code that has been already worked. The problem affects local variables of functions and passing arguments. Code has been wrongly compiled without any optimization. I have no courage and time to test optimizations.
I also encourage Keil not to publish Keil 4.13a any more.
Keil 4.12 seems to be OK.
I have uploaded 4 images here:
www.penguin.cz/.../K312_before_call.gif www.penguin.cz/.../K312_after_call.gif
www.penguin.cz/.../K313_before_call.gif www.penguin.cz/.../K313_after_call.gif
Please look carefully at &c depicted in Kxxx_before_call and address buff depicted in Kxxx_after_call. When you feel that <a>Keil 3.13 is as rock stable</a> ignore this post. For me a code crashes on protection fault. I expected to solve this issue not with you but with Keil. When some of you is Keil developper, please contact me at Email JaFojtik(AT)seznam(DOT)cz.
Hi,
After email communication with Jaroslav, we (he and I) have come to the conclusion that this is not a compiler bug.
The debugger appears to be reporting erroneous values, and when hard printf()s were added to print the values they appeared correct. This would indicate that the problem is likely to be elsewhere.
From RVCT's point of view there does not appear to be a code generation problem.
Kind regards,
James Molloy Graduate compiler engineer, RVCT, ARM.