Changing build configuration from Debug to Release causes different application behaviour




  • Avatar
    Blair Kingsland

    I am having the same problem. Even when I make the Debug and Release configurations the same, the Release behaves differently and not good. I suspect it is a problem with the keyword volatile or static. How do I observe the variables during Release? How do I debug the Release? What settings can I change to identify the problem in Release? How do I look at the output code?

  • Avatar
    Mark Boyce

    I am having the same problem. Is there a way to change the optimisation options so that both debug and release can be the same.  My code fails in release and when stepping through the assembly code it does not perform a function as intended. For instance I have a routine that calls a simple loop delay function. The call to this function is optimised out in the release code!

    Do we have to release code as debug to remove optimisation? or is there another way?


  • Avatar
    Mark Boyce

    Ok, I appear to have answered my own question. There is a 'project option' in 'Private Configuration'->Release to set the levels to



    Level 1

    Level 2

    Level 3

    Optimize for size

    I found these by using the Project Options search facility :)

    Can I assume these follow the GCC command line options (in my case for NXP LCP1768) ?


Please sign in to leave a comment.