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.

AM2434: Text section seems changed after loading

Part Number: AM2434


Tool/software:

Can you please tell how are loading the binary on EVM?

Are you using CCS to load the binary or using SBL to load binaries?

Also can you please tell how are calculating CRC for the loaded binary?

 

  1. The Code is added for calculating the CRC of text section (the text section contains instructions for calculating CRC of itself.).
  2. The CRC is calculated with the text segment from ELF file with statically (offline with seperate CRC calculator).
  3. As normal AM243x Application, the ELF file is converted to RPRC files with tool "out2rpc".
  4. As normal AM243x Application, the RPRC file is loaded by SBL from flash.
  5. The Code from Step.1 for CRC calculating is executed and the CRC from Step 2 are compared.   
    The comparing are passed for most blocks in text section, but some failed. 
     As I observed, it seems failed with the blocks near instructions of exist() and the CRC calculating from Step 1.
  • Hi Zhi,

    The Code is added for calculating the CRC of text section (the text section contains instructions for calculating CRC of itself.).

    Does the the final CRC also include code used for CRC calculation?

    The CRC is calculated with the text segment from ELF file with statically (offline with seperate CRC calculator).

    Is the offline tool supposed to generate the same CRC that is generated by the code itself?

    The comparing are passed for most blocks in text section, but some failed. 
     As I observed, it seems failed with the blocks near instructions of exist() and the CRC calculating from Step 1.

    Can you please tell us which specific text section are failed to match the CRC?

    Also you mentioned ".TI.section.flags" section, Can you please send the map file where have you seen this? I am not able to see the section with this name.

    Regards,

    Tushar

  • Does the the final CRC also include code used for CRC calculation?

    Yes, the code of crc calculation itself is also covered by the crc checking.

  • Is the offline tool supposed to generate the same CRC that is generated by the code itself?

    Yes

  • Can you please tell us which specific text section are failed to match the CRC?

  • an you please send the map file where have you seen this? I am not able to see the section with this name.

    mcu_m4f.zip

  • Regarding the question about the section .TI.section.flags ...

    This is a metadata section.  It contains information the build tools (especially the linker) use to keep track of properties of entities in the executable file.  Each section has several flags associated with it.  Some of them are encoded in the flags field specified in the ELF object file standard.  TI needs to add yet more flags for the sections.  But we don't want to use the existing flags field, for fear of using them all up, violating the ELF standard, etc.  So we put the extra TI only flags in this metadata section.  One example is a flag for marking a section preserved, which is a property related to the live firmware update feature supported for C28x targets.

    There are several other metadata sections.  All of the sections named .debug_something are metadata.  For your purposes, ignore all the metadata sections, including .TI.section.flags.

    Thanks and regards,

    -George

  • The Code from Step.1 for CRC calculating is executed and the CRC from Step 2 are compared.

    Can you clarify how are you getting the start address & size of the sections for CRC calculation at runtime?