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.

CCS/TMS320F28377S: C28x MCU Release Mode Issue, Where as it works fine with Debug Mode.

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I have completed my application debug mode thinking that i can load to flash finally, But now surprisingly the code hangs in release mode. 

Also i find that the delay function wrote is producing 1.2 Sec in Release mode, where as the same delay function produce 0.75 Sec in Debug Mode. 

There seems to be some clock configuration problem. I have verified all the setting for both debug and release and looks same. But Why is producing 

different timing for both Debug and Release modes. More over the CPU is not getting time for executing Main Routine. But I have tested  the same interrupt routines in 

Debug Mode without any issue. 

How to ensure both Debug and Release works in Same way. 

void delay(unsigned int count)
{
unsigned int i,j;

for(i=0;i<count;i++)
{
for(j=0;j<5500;j++)
{
asm(" NOP");
}
}

}

  • The debug build configuration probably uses --opt_level=off, while the release build configuration probably uses--opt_level=2.  This means the release build will run much faster.  So I am surprised to see you say the release build runs slower.  

    But don't focus on that too much.  This is not the best way to implement a delay.  The C2000Ware package has some macros and functions which are a much better solution for solving this problem.  They are discussed in this forum thread.

    Thanks and regards,

    -George

  • Hi George,

    Yes, it was --opt_level=2 in release mode initially, i have changed it to --opt_level=off already. 

    But still the problem remains same. Is it okay to used DELAY_US() macro for both debug and release modes or is there any limitation on that. Because it did not work for me release mode.  Okay let me give a try again and come back with result. 

    Other than delay, is there any other thing to be taken care while switching from Debug to Release ?

    I have seen a separate flash programming example. What is it for ?. Simply switching to Release mode will ensure to store the program from flash right ?

    Will there any impact on interrupt latency for Release mode ? Or it will be same in both the modes ?

    Regards

    Stalin 

     

  • ysn said:
    Is it okay to used DELAY_US() macro for both debug and release modes

    I am not specifically familiar with this macro.  But I don't know why it would act differently because of the compiler build options.

    Other than the change in optimization level that was already discussed, there is no reason to suspect a large difference in program behavior between the Debug and Release build configurations.

    Thanks and regards,

    -George