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.

CRC Generation Issue

We are building tirtos based application using  simplelink_msp432e4_sdk_4_20_00_12 and MSP432 board. We are building our workspace using CCS studio. Once build is completed we are generating CRC based on .out file.

Now problem is when we change workspace path or build same source on different machine we are getting different CRC.

Please find the below CRC generated on different workspaces.

Workspace1:
==============

../../../build_utilities/CRCGenerator.exe App.hex App_crc.hex 0xFFFF0
CRCGenerator version 1.00
Input Filename: App.hex
Output Filename: App_crc.hex
CRC Header Address: 0xffff0
CRC value: 0x7e03
CRC region start: 0x100
CRC region size: 0x3f072

**** Build Finished ****


Workspace2:
============

../../../build_utilities/CRCGenerator.exe App.hex App_crc.hex 0xFFFF0
CRCGenerator version 1.00
Input Filename: App.hex
Output Filename: App_crc.hex
CRC Header Address: 0xffff0
CRC value: 0x2325
CRC region start: 0x100
CRC region size: 0x3f022

**** Build Finished ****

Please need your help on how to get constant CRC if we build the code on different workspace.

  • The CRC region size for the two workspaces is different, so the first problem is to find the reason for the different sizes. Perhaps there are some absolute workspace paths which stored as string constants in the program. E.g. from a __FILE__ macro.

    The Code Generation Tools XML Processing Utilities has the objdiff utility which can compare two .out files and report which loadable sections have differences, to understand the reason for the differences.

  • absolute workspace paths is the reason for different sizes. How can we disable adding absolute paths in binary.

  • How can we disable adding absolute paths in binary.

    It's difficult to provide a generic answer, without knowing what is causing the absolute path to be in the binary file.

    Were you able to run the objdiff utility, and can you post the output from the comparison?

  • Hi 

    I have used following command to generate objdiff.

    objdiff.exe App1.out App2.out ofd6x >> objdiff_ouput1.txt

    ======================================================================
    Comparing File Headers : elf32_ehdr
    ======================================================================
             Differences:             App1.out	             App2.out
                 e_entry:              0x306bd	              0x30675
    ======================================================================
    Comparing Sections : section = .cinit : elf32_shdr
    ======================================================================
             Differences:             App1.out	             App2.out
                 sh_size:                0x460	                0x468
    ======================================================================
    Comparing Sections : section = .const
    ======================================================================
    	Raw data is different
    ======================================================================
    Comparing Sections : section = .init_array
    ======================================================================
    	Raw data is different
    ======================================================================
    Comparing Sections : section = .priheap
    ======================================================================
    	Raw data is different
    ======================================================================
    Comparing Sections : section = .resetVecs
    ======================================================================
    	Raw data is different
    ======================================================================
    Comparing Sections : section = .text : elf32_shdr
    ======================================================================
             Differences:             App1.out	             App2.out
                 sh_size:              0x2bc52	              0x2bc0a
    ======================================================================
    Comparing Sections : section = .vecs
    ======================================================================
    	Raw data is different
    ======================================================================
    Comparing Sections : section = xdc.meta : elf32_shdr
    ======================================================================
             Differences:             App1.out	             App2.out
                 sh_size:                0x129	                0x10e
    ======================================================================
    Comparing Segment Tables : program_table : p_vaddr = 0x110, p_type = PT_LOAD
    ======================================================================
             Differences:             App1.out	             App2.out
                 p_memsz:               0x5a98	               0x5aa0
    ======================================================================
    Comparing Segment Tables : program_table : p_vaddr = 0xc000, p_type = PT_LOAD
    ======================================================================
             Differences:             App1.out	             App2.out
                 p_memsz:              0x2bc92	              0x2bc4a
    
    Files are different
    

    Please find the attached output of objdiff utility.

  • Hi Sateesh,

    Does this issue have been resolved? do you need funture support?

    Thanks!

    Best Regards

    Johnson

  • Hi Johnson,

    Still my issue is not resolved, I have attached aobjdiff utility output as disscussed. Please need help to resolve the issue.

  • Hi Stateesh,

    I am not familar with TI-RTOS, but I find a similar thread maybe useful for you:

    https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/222380/hard-coded-paths-in-output-binary

    Thanks!

    Best Regards

    Johnson