This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

code composer in release mode

Other Parts Discussed in Thread: MSP430F4132

hi ti

 I am developing project using code composer-4 for msp430f4132. And using programmer usb MSP430-FET-430UIF.

 There is issue,which is coming out during release of code. As we know that in release mode, flash memory can be saved than debug mode. which can be selected as we go the following path: project->Active Build Configuration-> 1 debug and 2 release As It is working fine in debug mode but when run in release mode the lcd dislay is showing very fast scrolling. Another problem is that code composer is not allowing either to put break point or step-in of delay code only.

Over all issue is how to run code using code composer in release mode?

 I hope to get answered very soon.

 Anubhav

  • Anubhav,

    If you open the disassembly view and turn on viewing source you can see which lines of C have assembly associated with them.  These will be the lines that you can place breakpoints on.   You can also step through the assembly code in the disassembly view.

    Regards,

    John

  •  to ti,

    thank you for reply, but my problem is not solved yet. As i tried suggestion as you had given me but code for that part in dissambly is not visible

    As I am trying to build project  though option viz : project->Active Build Configuration->2 release,    , in this mode,When I builds project, there is no error.

    As I am using LCD display to view. But when i run code in this mode, display unit does not display properly. And message scrolles very fast that it is impossible to view  

    But same code when i select option path: project->Active Build Configuration-> 1 debug , 

    then working ok as well as displaying text and other messages on lcd correctly as per our design.

     

    1>I have noticed in release mode, one thing that when i was try to put break point on delay function code composer is not allow me to do so instead break point shift to any other line in code.

    2> in this mode (release mode) delays function are not working

    code that is part of delay function is:

     

    void wait_for_nmsec(uint16 n){

    uint16 i,j;

      for(i=0;i<=n;i++){

           for(j=0;j<=350;j++); }

           }

    }

    3> And my last queries but the most important is that how to run code in Release mode.

     

     

    thanks

    Anubhav

     

     

     

     

  • Anubhav Gupta said:
    1>I have noticed in release mode, one thing that when i was try to put break point on delay function code composer is not allow me to do so instead break point shift to any other line in code.

    This is expected. Because optimization is probably enabled with your release build, you will lose the ability for effective source line level debug since the optimize may have rearranged the code for best performance.

    Anubhav Gupta said:

    2> in this mode (release mode) delays function are not working

    code that is part of delay function is:

     

    void wait_for_nmsec(uint16 n){

    uint16 i,j;

      for(i=0;i<=n;i++){

           for(j=0;j<=350;j++); }

           }

    }

    Since you delay function is a loop that does nothing, the compiler probably optimized that call out.

    Anubhav Gupta said:
    3> And my last queries but the most important is that how to run code in Release mode.

    You run code the same as if it was the Debug code. The issues you are running into above are normal cases when trying to debug optimized code.

    See the below wiki topic for more infromation on how optimization affects your ability to debug code:

    http://processors.wiki.ti.com/index.php/Debug_versus_Optimization_Tradeoff

    Thanks

    ki

  • Hi Ki,

    Thanks, the link you've provided on Debug_versus_Optimization_Tradeoff was very informative. I was looking on how to ensure that my delay code works in Release mode and in one of TI's website I was able to find about Optimization levels. That really helped me and now that I have changed the optimization level to O1 I have more space for my code in the Debug mode itself and I am also able to run my delay routine as was done earlier.

    My issue is now resolved.

     

    Thanks

    Anubhav