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

Flash Write Using Code

My Flash Write Library is working fine when iam using Level 8 Optimization in Keil Compilor but when i use constant folding(Level 0) it was not working kindly give me a solution.

Thanks in Advance

Parents
  • "...working fine when iam using Level 8 Optimization in Keil Compiler but when i use constant folding (Level 0) it was not"

    Remember that each higher optimisation level includes all the lower-level optimisations: http://www.keil.com/support/man/docs/c51/c51_optimize.htm

    Therefore, Level-8 includes constant folding.

    You need to reduce the optimisation a step at a time to determine where it actually stops working - and then examine the differences between the generated code at that point.

    Could you be using software delay loops, and these end up just being too slow at the lower optimisation?
    (this is why you should never write software timing loops in a high-level language)

Reply
  • "...working fine when iam using Level 8 Optimization in Keil Compiler but when i use constant folding (Level 0) it was not"

    Remember that each higher optimisation level includes all the lower-level optimisations: http://www.keil.com/support/man/docs/c51/c51_optimize.htm

    Therefore, Level-8 includes constant folding.

    You need to reduce the optimisation a step at a time to determine where it actually stops working - and then examine the differences between the generated code at that point.

    Could you be using software delay loops, and these end up just being too slow at the lower optimisation?
    (this is why you should never write software timing loops in a high-level language)

Children