LAUNCHXL-CC26X2R1: Debug and Release

Part Number: LAUNCHXL-CC26X2R1

Hi,

   In building a project and using I want both Release and Debug modes hand in hand for flashing and checking functionalities working.

While debugging every time I have to change the optimization level to less than 2 .

So I want to customize both Release mode  optimization level and Debug mode  optimization level differently.

Can I do that through projectspecs? If so please suggest the process.

  • Hi Manikanth,

    This is accomplished through the .cproject file, specifically:

    <option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL.release.971375292" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL.release" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL.2" valueType="enumerated"/>

    I recommend that you go to Project Properties -> CCS Build -> Arm Compiler -> Optimization and change the Optimization level for each Build Configuration, press "Apply and Close" to deviate from the default settings, save the .cproject file from your project workspace directory, change the Optimization level again for each Configuration, save the second .cproject file, then compare the differences between the two variants you've created to further understand the necessary .cproject changes.

    Regards,
    Ryan

  • Hi,

     I got that process but I don't want that optimization level changing through proprties everytime.

    I want to have

                       -  Release mode Optimization Level to 4 when I set Release mode active

                       - Debug mode Optimization Level to 2 when I set Debug mode active

    I want to have those optimization levels set default for Release and Debug respectively.

    Can I configure in such a way? Is that possible through projectspec.

    What I see is in projectspec of example projects for both Release and Debug mode optimization level as 4.

    I want to have two different optimization levels for Release(O4) and Debug(O2).

  • This is possible through Project Properties -> CCS Build -> Arm Compiler -> Optimization and changing the Optimization level for each Build Configuration.  As you switch Build Configurations, the Optimization level will change as well.

    Regards,
    Ryan

  • I want to set it through projectspecs is that possible?

  • Yes, please reference the existing examples in <sdk root directory>\examples\rtos\CC26X2R1_LAUNCHXL\<stack>\<example>\tirtos\ccs (ex. C:\ti\simplelink_cc13x2_26x2_sdk_5_20_00_52\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\simple_peripheral\tirtos\ccs) and refer to the ProjectSpecs in CCS documentation.

    Regards,
    Ryan