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
  • I have a similar experience with Keil 4.13a.

    The following code enters an infinite loop when compiling with optimization levels 2 or 3.

    unsigned int x = 0x12;
    while (!((x & 0x02) && (x & 0x10))) {}
    // turn on LEDs here
    

    I observed the infinite loop by turning on some LEDs after the loop. With O2 and O3 the LEDs remain turned off.

    This was tested on the MCB2300 test board with µVision V4.13a.

Reply
  • I have a similar experience with Keil 4.13a.

    The following code enters an infinite loop when compiling with optimization levels 2 or 3.

    unsigned int x = 0x12;
    while (!((x & 0x02) && (x & 0x10))) {}
    // turn on LEDs here
    

    I observed the infinite loop by turning on some LEDs after the loop. With O2 and O3 the LEDs remain turned off.

    This was tested on the MCB2300 test board with µVision V4.13a.

Children