This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Avoid using Keil 4.13a - it generates defective code

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.

Parents
No data
Reply
  • I had a problem today, whereby a previously working bit of code "stopped working" when compiled with 4.13. I started the debugger and stepped through the code, and found that a local variable was being stored in r9, we then had a switch statement switching on this "local variable". Once it got to the correct case, the code then passed this local variable into another function. On single stepping we found that the compiler was using r9 during the switch statement to determine which case was a match. This then meant that when the "local" was passed into the function, r9 had become corrupted, and therefore it had incorrect functionality. Recompiled the code with aditional debug code, but it always failed in the same way. Loaded 4.11 back onto the PC, and recompiled the code, and the exact same code now functions as expected!
    I understand what people say about not being able to trust the debugger to report values correctly, but the code did not work with 4.13, but worked fine with 4.11.
    This seems to be similar to the original post on this thread reporting an issue with using local variables and passing them into functions.
    Think i am going to stick with 4.11 until I hear more from Keil.

Children