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.

Compiler/TMS570LS1227: Repeated compile of unchanged c file results in different object files

Part Number: TMS570LS1227

Tool/software: TI C/C++ Compiler

Hello,

I wondering why a get a non-constant output (.obj file) from repeated compilations of a non-changed c-file.

Looking at the output of the object viewer tool (armofd) I see that the .obj contains a symbol which changes each time I do the compilation:

Symbol Table ".symtab"

    <0> ""
       Value:    0x00000000  Kind:        undefined
       Binding:  local       Type:        none
       Size:     0           Visibility:  STV_DEFAULT

    <1> "7365210"
       Value:    0x00000000  Kind:        absolute
       Binding:  local       Type:        file
       Size:     0           Visibility:  STV_HIDDEN

...

Why is that? Is it possible to suppress this behaviour?

Regards

 Michael

  • That is the name of a temporary file. See the output "Type: file" in your example above. The compiler sometimes needs to create a temporary file to hold intermediate results of compilation. If you don't explicitly give a name for this file, the compiler will use an arbitrary temporary name. In your case, the file was named /tmp/7365210. Consider adding the compiler option -ft<dir> to name a build directory for the intermediate result files. If you do this, the compiler will name those files after the original C file, and you won't have this problem.
  • Hello,

    many thanks for the quick response. But I believe it does not solve the issue. Within CCS I specified a directory into the field "Properties-->CCS Build-->ARM Compiler-->AdvancedOptions-->DirectorySpecifier
    -->Mode: I tried both [automatic; manual]
    -->Temporary file directory (--temp_directory, -ft): Specified an arbitrary existing directory

    This results into the compiler invoke as appended below.

    Unfortunately the generated file "list.obj" still changes each time I invoke the compiler.

    Do you have any other suggestion?

    Regards
    Michael




    **** Build of configuration Debug for project SB_SCM****

    "C:\\ti550\\ccsv5\\utils\\bin\\gmake" -k kernel_source/list.obj
    'Building file: ../kernel_source/list.c'
    'Invoking: ARM Compiler'
    "C:/ti550/ccsv5/tools/compiler/arm_5.1.2/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi -Ooff --include_path="C:/ti550/ccsv5/tools/compiler/arm_5.1.2/include" --include_path="C:/sandbox/IndustrialFireS81HS/branches/SoftwareComponents/IntegratedSoftware/ProjectFiles/Safety Bus/SB-SCM/SB_SCM_SAFERTOS/kernel_source/portable/005_Code_Composer/023_TMS570_FPU" --include_path="C:/sandbox/IndustrialFireS81HS/branches/SoftwareComponents/IntegratedSoftware/ProjectFiles/Safety Bus/SB-SCM/SB_SCM_SAFERTOS/kernel_source/include" --symdebug:none --diag_warning=225 --display_error_number --enum_type=packed

    --temp_directory="C:/sandbox/tmp"

    --preproc_with_compile --preproc_dependency="kernel_source/list.pp" --obj_directory="kernel_source" "../kernel_source/list.c"
    'Finished building: ../kernel_source/list.c'
    ' '
  • Add the compiler option --keep_asm
  • A few more comments ...

    Please understand that TI does not guarantee that identical object files will result from successive builds of the same source.  We do not design or test for that constraint.  You are welcome to use the tips in this thread.  They do cause the builds to be ever more similar, and perhaps even identical in some cases.  But that does not mean we guarantee it will always be the case.

    Thanks and regards,

    -George