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.

Different output hex files by same code of TMS320F28031 with CCS6.1.3 compiler version 6.2.5

Other Parts Discussed in Thread: TMS320F28031, CONTROLSUITE

Hello Team,

one of my customers is working on TMS320F28031 with CCS6.1.3, C2000 compiler version 6.2.5. They have two PC where same CCS IDE version and same C2000 compiler (V 6.2.5) is installed but have two different behavior:

PC1:

After programming , Application is running in debugging mode but in standalone mode program is not booting up while application is configured for running from flash.

PC2:

Same program is imported on 2nd PC CCS IDE and application is running for debugging and standalone mode.

I have asked them to compare hex files generated by both the PC and there is difference in those files. I have got screenshot from them which I am attaching with this post.

Compiler Build and linker settings are as below:

compiler

-v28 -ml -mt --float_support=softlib -O4 --include_path="C:/ti/controlSUITE/libs/app_libs/digital_power/f2803x_v3.1" --include_path="C:/ti/controlSUITE/device_support/f2803x/v127/DSP2803x_common/include" --include_path="C:/ti/controlSUITE/libs/app_libs/digital_power/f2802x_v3.1/include" --include_path="C:/ti/ccsv6/tools/compiler/c2000_6.2.5/include" --include_path="C:/ti/controlSUITE/device_support/f2803x/v126/DSP2803x_headers/include" --include_path="C:/ti/controlSUITE/device_support/f2803x/v126/DSP2803x_common/include" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v160/include" --include_path="C:/ti/controlSUITE/libs/app_libs/solar/v1.2/IQ/include" -g --define="_DEBUG" --define="FLASH" --define="LARGE_MODEL" --diag_warning=225

 

………………………………………………………………………………………..

linker

-v28 -ml -mt --float_support=softlib -O4 -g --define="_DEBUG" --define="FLASH" --define="LARGE_MODEL" --diag_warning=225 -z -m"PCU_28031_1kw_48v_1_13.map" --stack_size=0x380 --warn_sections -i"C:/ti/ccsv6/tools/compiler/c2000_6.2.5/lib" -i"C:/ti/ccsv6/tools/compiler/c2000_6.2.5/include" --reread_libs --xml_link_info="PCU_28031_1kw_48v_1_13_linkInfo.xml" --rom_model

 

I have also asked them to check GEL files in IDE and f28031.gel are identical in both PC.

Please help me in resolving this issue...

Regards,

Vikas Chola

  • Please ask the customer to compare the final executable (.out) files generated on each machine, using the utility objdiff from the cg_xml package.  Please use the option --verbose and save the output to a text file, with file extension .txt.  Attach that file to the next post.  Also attach the linker map file from each build.  Because the forum accepts only a few different kinds of files, add the file extension .txt.  With all of those files, I should be able to tell you which function or data table contains the difference.  With that information, the customer will be able to tightly focus their attention on a small part of the system.  And that will hopefully make it easy to find the source of the difference.

    Thanks and regards,

    -George

  • Hello George,

    Thanks for your reply. I have asked customers to share these inputs. Will get back to you soon with the same.

    Regards,

    Vikas Chola

  • Hello George,

    Please find attached compare result and Linker file. In non working .out file Codestart section of code is not generating while linker file is absolutely same for both computer.

    I have asked to uninstall and install CCS again but results are same. Customer also have CCS6.1.2 on the same PC but program is not working with that however on other PC same program is working fine. As per customer he is transferring the same project in pen drive and importing it in CCS. Linker file is in the project folder only. 

    Please advise on the same.

    Regards,

    Vikas Chola

    /*
    //###########################################################################
    //
    // FILE:	F28031.cmd
    //
    // TITLE:	Linker Command File For F28031 Device
    //
    //###########################################################################
    // $TI Release: F2803x C/C++ Header Files and Peripheral Examples V126 $
    // $Release Date: November 30, 2011 $
    //###########################################################################
    */
    
    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\DSP2803x_Headers\cmd
    //
    // For BIOS applications add:      DSP2803x_Headers_BIOS.cmd
    // For nonBIOS applications add:   DSP2803x_Headers_nonBIOS.cmd
    ========================================================= */
    
    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */
    
    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l DSP2803x_Headers_nonBIOS.cmd */
    
    /* Uncomment this line to include file only for BIOS applications */
    /* -l DSP2803x_Headers_BIOS.cmd */
    
    /* 2) In your project add the path to <base>\DSP2803x_headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */
    
    /* Define the memory block start/length for the F28031
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections
    
       Notes:
             Memory blocks on F2803x are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.
    
             L0 memory block is mirrored - that is
             it can be accessed in high memory or low memory.
             For simplicity only one instance is used in this
             linker file.
    
             Contiguous SARAM memory blocks or flash sectors can be
             be combined if required to create a larger memory block.
    */
    
    --diag_suppress=16002
    
    MEMORY
    {
    PAGE 0:    /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
       RAML0       : origin = 0x008000, length = 0x001000     /* on-chip RAM block L0 */
       //RAML1       : origin = 0x008800, length = 0x000400     /* on-chip RAM block L1 */
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
    
       //FLASHH      : origin = 0x3F0000, length = 0x001000     /* on-chip FLASH */
       FLASHD      : origin = 0x3F0000, length = 0x001000     /* on-chip FLASH */
      // FLASHF      : origin = 0x3F2000, length = 0x001000     /* on-chip FLASH */
      // FLASHE      : origin = 0x3F3000, length = 0x001000     /* on-chip FLASH */
      // FLASHD      : origin = 0x3F3000, length = 0x002000     /* on-chip FLASH */
      // FLASHC      : origin = 0x3F5000, length = 0x001000     /* on-chip FLASH */
       FLASHA      : origin = 0x3F1000, length = 0x006F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
    
       IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA	  /* IQ Math Tables in Boot ROM */
    
       ROM         : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */
    
    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */
    
       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
      // RAML2       : origin = 0x008C00, length = 0x000400     /* on-chip RAM block L2 */
       RAML3       : origin = 0x009000, length = 0x000800     /* on-chip RAM block L3 */
       //FLASHB      : origin = 0x3F0000, length = 0x001000     /* on-chip FLASH */
    }
    
    /* Allocate sections to memory blocks.
       Note:
             codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
                       execution when booting to flash
             ramfuncs  user defined section to store functions that will be copied from Flash into RAM
    */
    
    SECTIONS
    {
    
       /* Allocate program areas: */
       .cinit              : > FLASHA      PAGE = 0
       .pinit              : > FLASHA,     PAGE = 0
       .text               : > FLASHA,      PAGE = 0
       codestart           : > BEGIN       PAGE = 0
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAML0,
                             LOAD_START(_RamfuncsLoadStart),
                           LOAD_END(_RamfuncsLoadEnd),
                           RUN_START(_RamfuncsRunStart),
                             PAGE = 0
       {
       		--library=Solar_Lib_IQ.lib<CNTL_2P2Z_IQ_ASM.obj>
       		--library=Solar_Lib_IQ.lib<CNTL_3P3Z_IQ_ASM.obj>
       		--library=Solar_Lib_IQ.lib<NOTCH_FLTR_IQ_ASM.obj>
       		--library=IQmath.lib<IQ24div.obj>
       		--library=IQmath.lib<IQ23sin.obj>
    		--library=IQmath.lib<IQ23cos.obj>
    		--library=IQmath.lib<IQ15rsmpy.obj>
    		--library=IQmath.lib<IQ15rmpy.obj>
    		--library=IQmath.lib<IQ15div.obj>
    		--library=IQmath.lib<IQ4div.obj>
    		--library=IQmath.lib<IQ15sqrt.obj>
    		--library=IQmath.lib<IQ15isqrt.obj>
       }
    
       csmpasswds          : > CSM_PWL_P0  PAGE = 0
       csm_rsvd            : > CSM_RSVD    PAGE = 0
    
       /* Allocate uninitalized data sections: */
       .stack              : > RAMM0,       PAGE = 1
       .ebss               : > RAML3,      PAGE = 1
       .esysmem            : > RAMM1,       PAGE = 1
    
       /* Initalized sections go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .econst             : > FLASHA      PAGE = 0
       .switch             : > FLASHA      PAGE = 0
    
       /* Allocate IQ math areas: */
       IQmath            : LOAD = FLASHA,
       					   RUN = RAML0,
       					   LOAD_START(_IQfuncsLoadStart),
       					   LOAD_END(_IQfuncsLoadEnd),
       					   RUN_START(_IQfuncsRunStart),
       					   PAGE = 0
       IQmathTables      : > IQTABLES     PAGE = 0, TYPE = NOLOAD   /* Math Tables In ROM */
    
      /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
    
       }
       */
        /* Uncomment the section below if calling the IQNasin() or IQasin()
           functions from the IQMath.lib library in order to utilize the
           relevant IQ Math table in Boot ROM (This saves space and Boot ROM
           is 1 wait-state). If this section is not uncommented, IQmathTables2
           will be loaded into other memory (SARAM, Flash, etc.) and will take
           up space, but 0 wait-state is possible.
        */
        /*
        IQmathTables3    : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
        {
    
                   IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)
    
        }
        */
    
       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset              : > RESET,      PAGE = 0, TYPE = DSECT
       vectors             : > VECTORS     PAGE = 0, TYPE = DSECT
        cntl_coeff_RAM 	: >	RAMM1, PAGE=1
    	cntl_var_RAM	: > RAMM1, PAGE =1
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    
    

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Documents and Settings\10905429>cd..
    
    C:\Documents and Settings>cd..
    
    C:\>cd "Program Files"
    
    C:\Program Files>cd "Texas Instruments"
    
    C:\Program Files\Texas Instruments>cd cg_xml
    
    C:\Program Files\Texas Instruments\cg_xml>cd utils
    
    
    C:\Program Files\Texas Instruments\cg_xml\utils>ofd6x -x -o=E:\2\PCU_28031_1kw_4
    8v_1_13.xml E:\2\PCU_28031_1kw_48v_1_13.out
    
    C:\Program Files\Texas Instruments\cg_xml\utils>cd..
    
    C:\Program Files\Texas Instruments\cg_xml>cd bin
    
    C:\Program Files\Texas Instruments\cg_xml\bin>objdiff --verbose E:\1\PCU_28031_1
    kw_48v_1_13.xml E:\2\PCU_28031_1kw_48v_1_13.xml
    Processing E:\1\PCU_28031_1kw_48v_1_13.xml ...
    Processing E:\2\PCU_28031_1kw_48v_1_13.xml ...
    Comparing files ...
    
    ======================================================================
    Comparing Sections : section = csmpasswds
    ======================================================================
    Raw data is different
       Byte 1 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xf
       Byte 3 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xf0
       Byte 4 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xf
       Byte 6 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xf0
       Byte 9 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xaf
       Byte 11 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xfa
       Byte 12 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xaf
       Byte 14 is different
          E:\1\PCU_28031_1kw_48v_1_13.out: 0xff
          E:\2\PCU_28031_1kw_48v_1_13.out: 0xfa
    ======================================================================
    Comparing Optional File Headers : optional_file_header
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
               text_size:               0x5792                     0x5798
             entry_point:             0x3f64fb                   0x3f64f9
    ======================================================================
    Comparing Sections : section = .cinit
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
            virtual_addr:             0x3f6ef1                   0x3f6ef7
           physical_addr:             0x3f6ef1                   0x3f6ef7
    ======================================================================
    Comparing Sections : section = .econst
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
           physical_addr:             0x3f6792                   0x3f6798
            virtual_addr:             0x3f6792                   0x3f6798
    ======================================================================
    Comparing Sections : section = .switch
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
           physical_addr:             0x3f7610                   0x3f7616
            virtual_addr:             0x3f7610                   0x3f7616
    ======================================================================
    Comparing Sections : section = .text
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
           raw_data_size:               0xaf24                     0xaf30
    ======================================================================
    Comparing Sections : section = IQmath
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
            virtual_addr:             0x3f775c                   0x3f7762
    ======================================================================
    Comparing Sections : section = codestart
    ======================================================================
             Differences: E:\1\PCU_28031_1kw_48v_1_13.out    E:\2\PCU_28031_1kw_48v_
    1_13.out
           raw_data_size:                  0x0                        0x4
            virtual_addr:                  0x0                   0x3f7ff6
           physical_addr:                  0x0                   0x3f7ff6
    Only in E:\1\PCU_28031_1kw_48v_1_13.out
            copy
    
    Only in E:\2\PCU_28031_1kw_48v_1_13.out
            text
    
    
    Files are different
    
    C:\Program Files\Texas Instruments\cg_xml\bin>

  • I don't know why, but I suspect a difference in how the code is built.  For each project, please perform a complete rebuild.  Right click on the project name and choose Rebuild Project.  Then save off everything on the build from the Console view.  Use the icon Copy Build Log to create the file.  Use the file extension .txt.  Attach both build logs to your next post.  I suspect comparing these files will reveal a meaningful difference.

    Thanks and regards,

    -George

  • Hello George,

    Thanks for your support. We got the issue causing this error.

    Customer is using some linked files from control suite default location specially DSP2803x_CodeStartBranch.asm ( path C:\ti\controlSUITE\device_support\f2803x\v129\DSP2803x_common\source\DSP2803x_CodeStartBranch.asm). This file has got corrupted in one PC.  When customer imports the same project to another PC, it got the right file as that PC control suite is having different  DSP2803x_CodeStartBranch.asm file and that's why it is generating right .out file....

    We have updated the file in first PC and now everything is working. Thanks for your help and guidance of using cg_xml tool. It really helped.

    Regards,

    Vikas Chola