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.

Release mode and debug mode in CCS



What are differences between building the code in release mode and debug mode in CCS?  Could you please elaborate with respect to execution time, memory required and memory section?

Regards

  • Aasif,

    Debug and Release are build configurations that are present in many example projects.  A project in CCS can have one or more build configurations.  A build configuration specifies the version of the compiler to use, the settings and options for the compiler, which source files to include/exclude...  So depending on the settings in the configuration the impact on execution time and memory use could be nothing or significant.

    Often people will setup the debug build configuration to have full symbolic debug information enabled to improve the ability to debug the application.  It is also common to remove debug information from the release configuration and to use a higher level of optimization.  Note that the build options used by each configuration are completely under your control.

    Using the memory allocation view in CCS can help you to understand memory use.  The memory allocation view can be opened from the view menu.  As far as execution time that is something that you will need to measure.  I am not aware of which device you are using but there are workshops on CCS for a number of different devices that cover how to measure performance.  For small sections of code this can be done using the profile clock.  https://dev.ti.com/tirex/explore/node?node=AAIf3mqiIfhQbPJzrtjEcA__FUz-xrs__LATEST

    Regards,

    John

  • Aasif,

    Expanding the answer from JohnS and taking your first question at face value, the explicit difference between the two build configurations can be ascertained by comparing the compiler/linker arguments as text.

    If I create a new CCS project for Delfino I get the following compiler switches:

    <Release>

     -v28
    -ml
    -mt
    --cla_support=cla1
    --float_support=fpu32
    --tmu_support=tmu0
    --vcu_support=vcu2
    -O2
    --include_path="W:/CCS_workspace/ExampleCCS"
    --include_path="C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-c2000_20.2.2.LTS/include"
    --printf_support=minimal
    --diag_warning=225
    --diag_wrap=off
    --display_error_number
    --abi=eabi

    <Debug>

    -v28
    -ml
    -mt
    --cla_support=cla1
    --float_support=fpu32
    --tmu_support=tmu0
    --vcu_support=vcu2
    --include_path="W:/CCS_workspace/ExampleCCS"
    --include_path="C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-c2000_20.2.2.LTS/include"
    -g
    --printf_support=minimal
    --diag_warning=225
    --diag_wrap=off
    --display_error_number
    --abi=eabi

    The difference between the two above is that:

    - Release uses optimisation level 2 (-O2) where the Debug has none.

    - Release has no symbolic debug info. (missing -g).

    Of course the differences are what you make them thereafter.