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 3.1 / Remove profiling information

Other Parts Discussed in Thread: CCSTUDIO

Hello,

i am using CCS V3.1 and, and i want to generate code which will be directly downloaded onto DSP 6713 (no emulator, no simulation...). I use SpectrumDigital DSK6713 and set up C6713 DSK-USB in the code composer studio setup.

The problem is that the .out file that is generated contained profiling information. For example, in one of the .asm file:

1 ;******************************************************************************
2 ;* TMS320C6x C/C++ Codegen PC v5.1.0 *
3 ;* Date/Time created: Mon Jul 27 20:07:30 2015 *
4 ;******************************************************************************
5 .compiler_opts --endian=little --mem_model:code=far --mem_model:data=far --predefine_memory_mo

7 ;******************************************************************************
8 ;* GLOBAL FILE PARAMETERS *
9 ;* *
10 ;* Architecture : TMS320C671x *
11 ;* Optimization : Enabled at level 3 *
12 ;* Optimizing for : Speed *
13 ;* Based on options: -o3, no -ms *
14 ;* Endian : Little *
15 ;* Interrupt Thrshld : Disabled *
16 ;* Data Access Model : Far *
17 ;* Pipelining : Enabled *
18 ;* Speculate Loads : Disabled *
19 ;* Memory Aliases : Presume are aliases (pessimistic) *
20 ;* Debug Info : Optimized w/Profiling Info *
21 ;* *
22 ;******************************************************************************

The question i had is : how remove profiling information and just generate an executable code which will be put in production ? Is the target i chose is not the good one ("C6713 DSK-USB") ?

Thank

Sébastien

  • Hello,
    Which debug info type is being generated, STABS or DWARF? I believe both are supported with CCSv3.1

    Thanks
    ki
  • Hello,

    this is DWARF format. When i change the build option in order to generate full debug information, DWARF is generate (see below)

    ;******************************************************************************
    ;* TMS320C6x C/C++ Codegen PC v5.1.0 *
    ;* Date/Time created: Tue Jul 28 10:09:35 2015 *
    ;******************************************************************************
    .compiler_opts --endian=little --mem_model:code=far --mem_model:data=far --predefine_memory_model_macros --silicon_version=6710

    ;******************************************************************************
    ;* GLOBAL FILE PARAMETERS *
    ;* *
    ;* Architecture : TMS320C671x *
    ;* Optimization : Enabled at level 3 *
    ;* Optimizing for : Speed *
    ;* Based on options: -o3, no -ms *
    ;* Endian : Little *
    ;* Interrupt Thrshld : Disabled *
    ;* Data Access Model : Far *
    ;* Pipelining : Enabled *
    ;* Speculate Loads : Disabled *
    ;* Memory Aliases : Presume are aliases (pessimistic) *
    ;* Debug Info : DWARF Debug *
    ;* *
    ;******************************************************************************

    .asg A15, FP
    .asg B14, DP
    .asg B15, SP
    .global $bss


    DW$CU .dwtag DW_TAG_compile_unit
    .dwattr DW$CU, DW_AT_name("dma.c")
    .dwattr DW$CU, DW_AT_producer("TMS320C6x C/C++ Codegen PC v5.1.0 Copyright (c) 1996-2005 Texas Instruments Incorporated")
    .dwattr DW$CU, DW_AT_stmt_list(0x00)
    .dwattr DW$CU, DW_AT_TI_VERSION(0x01)

    When i change the build option to remove debug information, this file become (and the .out that is generated contained profiling/debug information like function name...)

    ;******************************************************************************
    ;* TMS320C6x C/C++ Codegen PC v5.1.0 *
    ;* Date/Time created: Tue Jul 28 10:16:14 2015 *
    ;******************************************************************************
    .compiler_opts --endian=little --mem_model:code=far --mem_model:data=far --predefine_memory_model_macros --silicon_version=6710

    ;******************************************************************************
    ;* GLOBAL FILE PARAMETERS *
    ;* *
    ;* Architecture : TMS320C671x *
    ;* Optimization : Enabled at level 3 *
    ;* Optimizing for : Speed *
    ;* Based on options: -o3, no -ms *
    ;* Endian : Little *
    ;* Interrupt Thrshld : Disabled *
    ;* Data Access Model : Far *
    ;* Pipelining : Enabled *
    ;* Speculate Loads : Disabled *
    ;* Memory Aliases : Presume are aliases (pessimistic) *
    ;* Debug Info : Optimized w/Profiling Info *
    ;* *
    ;******************************************************************************

    .asg A15, FP
    .asg B14, DP
    .asg B15, SP
    .global $bss


    DW$CU .dwtag DW_TAG_compile_unit
    .dwattr DW$CU, DW_AT_name("Config225cfg_c.c")
    .dwattr DW$CU, DW_AT_producer("TMS320C6x C/C++ Codegen PC v5.1.0 Copyright (c) 1996-2005 Texas Instruments Incorporated")
    .dwattr DW$CU, DW_AT_stmt_list(0x00)
    .dwattr DW$CU, DW_AT_TI_VERSION(0x01)
    ; C:\CCStudio_v3.1\C6000\cgtools\bin\opt6x.exe --gen_opt_info=2 ./Release225/Config225cfg_c.if ./Release225/Config225cfg_c.opt --opt_info_filename=./Release225/Config225cfg_c.nfo
    .sect ".text:CSL_cfgInit"
    .global _CSL_cfgInit

    DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("CSL_cfgInit"), DW_AT_symbol_name("_CSL_cfgInit")
    .dwattr DW$1, DW_AT_low_pc(_CSL_cfgInit)
    .dwattr DW$1, DW_AT_high_pc(0x00)
    .dwattr DW$1, DW_AT_begin_file("Config225cfg_c.c")
    .dwattr DW$1, DW_AT_begin_line(0x1e)
    .dwattr DW$1, DW_AT_begin_column(0x06)
    .dwattr DW$1, DW_AT_frame_base[DW_OP_breg31 0]
    .dwattr DW$1, DW_AT_skeletal(0x01)
    .dwpsn "Config225cfg_c.c",31,1
    ;----------------------------------------------------------------------

  • The default option for DWARF debug symbols is "Skeletal DWARF". This option causes the compiler to emit enough debug information to support profiling, while not interfering with optimization. If you are not using any -g /symdebug option, then you are using skeletal DWARF. Note that the debug information is in the debug symbols itself, not the actual code. It has no impact on your code or optimization.

    Thanks
    ki
  • Thank, i add the option "--symdebug:none" and it is working. However, as i need to reduce size of the .out, i see that there are still some section in the COFF file which are related to debug (the space of these 4 sections is 32 Kb) : There are section :$BRID, debug_frame, debug_abbrev, debug_info, debug_line.

    I realy need to remove these sections which are useless. Here are my choice :

    1- Found a way to ask to compiler/linker to remove these section

    2- Found a tool which remove these sections from the .app (COFF format)

    3- Build my own tool to remove these sections from the .app.

    Do you know if it is possible to force the compiler to not generated theses sections ?

    Regards,

  • I assume you do not need any debug information. If that is the case, you can use strip6x to remove it all. See section 10.4 for the Assembly Language User's Guide: http://www.ti.com/lit/ug/spru186w/spru186w.pdf

    Thanks
    ki

  • GReat. Thank you very much. It is working well. Last question, is this tool exist with version 2.21 of CCS (i found it with version 3.1 of CCS) ?

    Regards,
  • I checked the compiler installation that comes with CCSv2.2 and the strip utility is not there. The strip utility is a standalone application so you can simply use the version you found with your 3.1 installation