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.

# TMS320DM8148: Transition from CGT 7.3.4 to CGT 7.6.0 for TMS320DM8148

Part Number: TMS320DM8148
Other Parts Discussed in Thread: SYSBIOS

We are using TMS320DM148 for a few years.

Until today we used code generation tools version 7.3.4 and it worked well. We now want to move to newer tools and we tried to use code generation tools version 7.6.0

When using these tools we noticed that image size is significantly reduced. I noticed that when building image with tolls 7.3.4 i get about 18Mb but when using tools 7.6.0 on the same project i get 12Mb image.

I have a few questions:

a. Does code generation tools 7.6.0 comply with TMS320DM148, are there any known problems that should prevent the transition?

b. Does the size reduction described above make sense in the transition between the tools?

Thanks

• we noticed that image size is significantly reduced

How do you reach this conclusion?  Exactly what do you look at?

Thanks and regards,

-George

• I reached this conclusion by building my code once with code generation tools 7.4.6 and once with code generation tools 7.6.0 with everything else unchanged

• The code generation tools selection affects: rts6740_elf.lib libc.a and compilation or linkage tools (cl6, ar6, lnk6...etc). The compilation output size with CGT 7.4.6 was 20M and the compilation output size with CGT7.6.0 was 12M

• Please give a detailed description of how you compute ...

the compilation output size

Thanks and regards,

-George

• After compilation is over Iink all objects using the follwoing command

LNK6 = $(CGT)\lnk6x$(LNK6) --abi=eabi -mv6740 --define==dm8148 \
.\Ac5042256.cmd \
-w --rom_model \
-m $(MISC)\$(CHIP_TYPE)_EthernetOnly.map -o$(OUT)\$(CHIP_TYPE)_EthernetOnly.out \
-l $(TOOLS)\lib\rts6740_elf.lib \ -l$(TOOLS)\lib\libc.a \
-l $(PACKAGES)\ti\sysbios\lib\instrumented_e674\sysbios\sysbios.lib \ -l$(PACKAGES)\ti\sysbios\lib\debug\ti.sysbios.ae674 \
-l $(PACKAGES)\ti\bios\lib\release\ti.bios.ae674 \ -l$(PACKAGES)\ti\sysbios\family\c64p\lib\debug\ti.sysbios.family.c64p.ae674 \
-l $(PACKAGES)\ti\sysbios\family\c64p\ti81xx\lib\debug\ti.sysbios.family.c64p.ti81xx.ae674 \ -l$(EDMA)\packages\ti\sdo\edma3\drv\lib\674\release\edma3_lld_drv.ae674 \
-l $(EDMA)\packages\ti\sdo\edma3\rm\lib\ti814x-evm\674\release\edma3_lld_rm.ae674 \ -l$(EDMA)\packages\ti\sdo\edma3\drv\sample\lib\ti814x-evm\674\debug\edma3_lld_drv_sample.ae674 \
copy $(OUT)\$(CHIP_TYPE)_EthernetOnly.out $(OUT)\AC5042AE3.$(VER)

I compare the output size of the linkage to get the output size.

I also looked at the map file that was created and compared it between the 2 compilations I see that many objects are smaller when using new CGT although code is unchangd

• I remain unclear on what you mean by ...

the output size of the linkage

To understand why I ask, please see the article A Brief History of TI Object File Formats.  Focus on the paragraph titled Comparing Sizes.  I suspect you are referring to one of these ways to measure the size.  But I don't know which one.

Based on this ...

I also looked at the map file that was created and compared it between the 2 compilations I see that many objects are smaller

I suspect some of the functions are smaller when built with the newer compiler.  Therefore, I'd appreciate if you would use the method described in the article Find Source of Code Size Increase to find the function which changes size the most.  For the source file which contains that function, please follow the directions in the article How to Submit a Compiler Test Case.  In addition, please tell me the name of this function.

Thanks and regards,

-George

• When I compared using the method you suggested the obj binary sizes I see the difference is very small total of 1500 bytes more in CGT 7.3.4 (Total size is 1286212 bytes so this difference is insignificant).

But when I look at the *.out file size (the file I used as input for the ofd64 tool) I see it is 12368Kb in CGT 7.6.0 and 20445Kb in CGT 7.3.4

I also compared the hex files created by the Hex6 tool and I see the difference is relatively small 4196Kb compared to 4204Kb

Does it make sense? Also please advise regarding question a of this issue "Does code generation tools 7.6.0 comply with TMS320DM148, are there any known problems that should prevent the transition?"

Doron

• I don't have your *.out files.  So I built a simple "hello world" program with compiler versions 7.3.4 and 7.6.0.  Here is a comparison of the total size of each file ...

C:\examples>dir hello*.out
...
08/25/2021  09:25 AM            60,157 hello734.out
08/25/2021  09:30 AM            42,330 hello760.out

I investigated a bit.  The main cause of this file size difference is not the size of the code contained in each file.  It is the size of the debug information in each file.

The debug information is used by CCS to do things like associate an address with a line of code, or to know the type of a variable.  It is contained in sections named .debug_something.  Here is one way to use ofd6x to see the difference in the sizes of the debug information.

C:\examples>ofd6x --obj_display=none,sections hello734.out | findstr debug
15 .debug_info               0x00000000 0x00000000 0x93f4     1   N
16 .debug_line               0x00000000 0x00000000  0x7ac     1   N
17 .debug_abbrev             0x00000000 0x00000000  0x31e     1   N

C:\examples>ofd6x --obj_display=none,sections hello760.out | findstr debug
15 .debug_info               0x00000000 0x00000000 0x3dd7     1   N
16 .debug_line               0x00000000 0x00000000  0x8d1     1   N
17 .debug_abbrev             0x00000000 0x00000000  0x348     1   N
18 .debug_aranges            0x00000000 0x00000000  0x370     1   N
19 .debug_pubnames           0x00000000 0x00000000  0x491     1   N
20 .debug_pubtypes           0x00000000 0x00000000  0x343     1   N

Even though version 7.6.0 has more debug sections, the total size of these sections is much smaller.  Lots of work was done to change how the debug information is organized so that, while it contains the same amount of information, it is much smaller.  That means the files are smaller, and CCS can load them faster.

Does code generation tools 7.6.0 comply with TMS320DM148, are there any known problems that should prevent the transition?

Compiler version 7.6.0 can generate code for the C674x CPU core on this device.  However, I notice you use other packages of software from TI, such as SYS/BIOS and EDMA.  These packages are documented to be tested with certain versions of the compiler.  Please find that documentation and understand what it says about using other versions of the compiler.

Thanks and regards,

-George