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 size increase in newer version

Other Parts Discussed in Thread: TMS320C6416

I have a project that I have a TMS320C6416 project compiled with CCSv3.3 (CGT v. 6.0.8)

The flags have been -O3 -mv6400

Then I have imported that project in CCSv4 (CGT v. 7.2.3), but now the code size (.text) have nearby doubled in size (from ~ 0x5ea0 to 0xA000).

I would like to know about I have made something wrong, missed a flag or similar?

In the XX_link.cmd file I have one line in the CCSv3.3 project, that I had to remove in CCSv4 due to it gave an error in CCSv4, it gives an warning when removed in CCSv3.3 (but code size is not influenced):

.template       > ISRAM

I have afterwards compiled bothe the CCSv3.3 and the CCSv4 projects with -k -ss flags, and the headers of the asm files are:

The header for CCSv3.3 project:

;******************************************************************************
;* TMS320C6x C/C++ Codegen                                          PC v6.0.8 *
;* Date/Time created: Wed Aug 31 14:18:19 2011                                *
;******************************************************************************
    .compiler_opts --c64p_l1d_workaround=default --endian=little --hll_source=on --mem_model:code=near --mem_model:data=far_aggregates --silicon_version=6400 --symdebug:skeletal

The header for CCSv4 project:

;******************************************************************************
;* TMS320C6x C/C++ Codegen                                          PC v7.2.3 *
;* Date/Time created: Wed Aug 31 14:10:55 2011                                *
;******************************************************************************
    .compiler_opts --abi=coffabi --c64p_l1d_workaround=default --endian=little --hll_source=on --long_precision_bits=40 --mem_model:code=near --mem_model:const=data --mem_model:data=far_aggregates --object_format=coff --silicon_version=6400 --symdebug:skeletal

The difference is that those extra flags are listed in the CCSv4 project:

* --abi=coffabi

* --long_precision_bits=40

* --mem_model:code=near

* --object_format=coff

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

Hope that somebody can clarify

 

Best regards,

Benny Simonsen,

Gatehouse A/S, Denmark

  • Benny Simonsen said:

    Then I have imported that project in CCSv4 (CGT v. 7.2.3), but now the code size (.text) have nearby doubled in size (from ~ 0x5ea0 to 0xA000).

    I would like to know about I have made something wrong, missed a flag or similar?


    I would suggest starting by comparing the link map files from the 2 builds, specifically the .text output section. The map file should help naroow down which files/input sections are contributing to the overall size increase of the .text section.

  • This wiki article describes a way to find the functions which have the largest code size increase between builds

    Thanks and regards,

    -George

  • Yes, it was in the map files I found the .text area increase - it was actually for a object the numbers I listed.

    I have looked into the output of ofd6x, and I can see that several new functionsappers and many functions are dublicated (maybe when a class have been inherited or instantiated). But I can't see why the new tool version increases the code size.

    Are there any switches to use not to increase the code size so much in the new nersion?

  • If you have identified a particular object file that is contributing to the majority of code size increase, could you provide us the corresponding source file for further analysis? We would also need the complete list of compile options used for the build.

    You could try adding the option for reducing code size(--opt_for_space) to see if that helps. Please see the Compiler Users Guide for details on the option.