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.

CCSTUDIO: Output file (.out) is not same for the successive builds with no change in the code

Part Number: CCSTUDIO

I am using CCS 12.1.0 for the TI C2000 series controller. If I rebuild my project without any changes in the code or settings, the output file (.out) file generated is different every time. Why is this the case? Is it storing time-stamp, etc in the out file? If I provide the .out file for the testing team and then after some time I try to verify which code I used from the git history, it gives me a hard time as the newly generated .out file does not match with the already provided.

  • Hello Sandesh,

    While I know the contents of the file are essentially gibberish, you can do a text file comparison to see what changed. I can't say for certain if there's a timestamp in there, but when you recompile a project the .out will get replaced every single time. It won't avoid re-creating the .out just because you haven't made a change if you're doing a full re-compile. If you're just building, it may or may not remake the .out I'm not sure.

  • Hi Omer,

    Without changing the code or any settings, I am rebuilding a project. So .out file is getting generated every time I rebuild. I don't have any confusion about this. My question is, in these 2 subsequent rebuilds why do the generated .out files differ (when compared in text compare tool). This is not the case if I generate hex files using hex utility. Now, hex file is a subset of .out file as it contains only the data to be filled in the memory whereas .out file is more versatile having other things like debug info, etc. I am wondering why .out file changes every time.

    I need clarity as I am providing .out file to the testing team and sometimes I need to go back in my git history, generate .out file and check whether it matches what I had provided in past. If this problem is not solvable, I would better give them the hex file.

  • My question is, in these 2 subsequent rebuilds why do the generated .out files differ (when compared in text compare tool)

    Can you please show the diffs if possible?

  • Sure Omer. Here are the files out_files.

  • Hello Sandesh,

    Looking at the two .out files with fc command prompt, this was the output (line numbers for each file is listed for the differences):

    ***** motor_control_1.out
    70667:  .debug_frame
    ...
    70670:  u16MsgNo$1
    ***** MOTOR_CONTROL.OUT
    70667:  .debug_frame
    ...
    70670:  u16MsgNo$1
    *****
    
    ***** motor_control_1.out
    70694:  .text:MTR_CAN_ReadCanMsgAt1ms
    ...
    70697:  mtr_state_request
    ***** MOTOR_CONTROL.OUT
    70694:  .text:MTR_CAN_ReadCanMsgAt1ms
    ...
    70697:  mtr_state_request
    *****
    
    ***** motor_control_1.out
    70698:  .text:motor_state_request_init
    70699:  {88CC08E5-9270-418D-931C-5220EB6850F8}
    70700:  $C$L1
    ***** MOTOR_CONTROL.OUT
    70698:  .text:motor_state_request_init
    70699:  {2FFE729C-292E-4FBD-81E4-58BF41314486}
    70700:  $C$L1
    *****
    
    ***** motor_control_1.out
    70709:  .text:main
    70710:  {C91F34B9-EA6C-4085-9300-FBD81003F8F1}
    70711:  $C$L25
    ***** MOTOR_CONTROL.OUT
    70709:  .text:main
    70710:  {C89BC635-A56A-4A45-8CF3-914EADB6827B}
    70711:  $C$L25
    *****
    
    ***** motor_control_1.out
    70713:  .text:BLCOMPAT_ChkRepgrmRqst
    ...
    70721:  $C$L27
    ***** MOTOR_CONTROL.OUT
    70713:  .text:BLCOMPAT_ChkRepgrmRqst
    ...
    70721:  $C$L27
    *****
    
    ***** motor_control_1.out
    70732:  .text:DRV8353_enable
    70733:  {EEFF0212-B37B-4FCD-8BCD-8B3F8D8837D1}
    70734:  prvFLASHDRV_ProgramFlash
    ***** MOTOR_CONTROL.OUT
    70732:  .text:DRV8353_enable
    70733:  {D3CE2459-FF73-4B1D-845E-FA367258E845}
    70734:  prvFLASHDRV_ProgramFlash
    *****
    
    ***** motor_control_1.out
    70753:  .text:FLASHDRV_Init
    70754:  {9BE94782-A9C2-4F07-A802-385AB1DB2765}
    70755:  $C$L49
    ***** MOTOR_CONTROL.OUT
    70753:  .text:FLASHDRV_Init
    70754:  {95F9F97F-B4C5-4ABA-BB07-EBA6EEB7E211}
    70755:  $C$L49
    *****
    
    ***** motor_control_1.out
    70797:  .text:initMotor1CtrlParameters
    70798:  {00CAFBAE-64B2-46AC-94E2-FD41F14ABCD9}
    70799:  .text:updateGlobalVariables
    ***** MOTOR_CONTROL.OUT
    70797:  .text:initMotor1CtrlParameters
    70798:  {166C9A06-6C62-44C2-B445-7424BCDF7C68}
    70799:  .text:updateGlobalVariables
    *****
    
    ***** motor_control_1.out
    70808:  .text:calcMotorOverCurrentThreshold
    70809:  {20768A0E-0249-42C3-956A-0BAD14C5DB24}
    70810:  .text:Device_initGPIO
    ***** MOTOR_CONTROL.OUT
    70808:  .text:calcMotorOverCurrentThreshold
    70809:  {021362C0-113F-44D4-8FC2-EE8CF02BC6B7}
    70810:  .text:Device_initGPIO
    *****
    
    ***** motor_control_1.out
    70814:  wd_disable
    ...
    70817:  .text:ANGLE_GEN_setParams
    ***** MOTOR_CONTROL.OUT
    70814:  wd_disable
    ...
    70817:  .text:ANGLE_GEN_setParams
    *****
    
    ***** motor_control_1.out
    70818:  .text:ANGLE_GEN_init
    ...
    70822:  .text:CPU_TIME_reset
    ***** MOTOR_CONTROL.OUT
    70818:  .text:ANGLE_GEN_init
    ...
    70822:  .text:CPU_TIME_reset
    *****
    
    ***** motor_control_1.out
    70823:  .text:CPU_TIME_init
    ...
    70832:  .text:HALL_setParams
    ***** MOTOR_CONTROL.OUT
    70823:  .text:CPU_TIME_init
    ...
    70832:  .text:HALL_setParams
    *****
    
    ***** motor_control_1.out
    70836:  .text:HALL_init
    ...
    70859:  .text:VS_FREQ_setProfile
    ***** MOTOR_CONTROL.OUT
    70836:  .text:HALL_init
    ...
    70859:  .text:VS_FREQ_setProfile
    *****
    
    ***** motor_control_1.out
    70860:  .text:VS_FREQ_init
    70861:  {22AACD30-F356-479F-BC37-F00DF412E334}
    70862:  .bss:u16BLCanDataBuff
    ***** MOTOR_CONTROL.OUT
    70860:  .text:VS_FREQ_init
    70861:  {5751986A-1B06-4FE5-937D-22C2CFD74F02}
    70862:  .bss:u16BLCanDataBuff
    *****
    
    ***** motor_control_1.out
    70867:  .text:CANA_Init
    70868:  {45B692F2-EE6D-460C-94E2-EE016E3E3D6F}
    70869:  .text:HAL_setupTimeBaseTimer
    ***** MOTOR_CONTROL.OUT
    70867:  .text:CANA_Init
    70868:  {97A45EB0-0F3D-4607-89F4-D2A78B211997}
    70869:  .text:HAL_setupTimeBaseTimer
    *****
    
    ***** motor_control_1.out
    70891:  .text:HAL_MTR1_init
    ...
    70896:  .text:CQ_IsFull
    ***** MOTOR_CONTROL.OUT
    70891:  .text:HAL_MTR1_init
    ...
    70896:  .text:CQ_IsFull
    *****
    
    ***** motor_control_1.out
    70899:  .text:CQ_Get
    70900:  {5BCDE15F-D048-4A50-945D-57B5E77992C8}
    70901:  TI6jAJON1ok
    ***** MOTOR_CONTROL.OUT
    70899:  .text:CQ_Get
    70900:  {ED1C00F5-AC7B-440D-B048-B913AB783221}
    70901:  TI6jAJON1ok
    *****

    I'm not exactly sure what these changes relate to, I will forward this to the compiler experts.

  • Got it. Thanks!
    Looking forward to hearing from compiler experts then.

  • While I can't test to be certain, I'm confident that building with the compiler option --keep_asm will cause the generated .out files to match.  To understand why, please see this forum post.

    If that doesn't work out, then using the hex file is the best solution.

    Thanks and regards,

    -George

  • Having --keep-asm in the assembler option has resolved the issue. Now the .out files are generated the same every time.
    Thanks a lot, George Mock!