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/TMS320F28379D: CRC checksum for the flash memory

Part Number: TMS320F28379D

Tool/software: TI C/C++ Compiler

Hello,

I have a question regarding the linker generated CRC check. In order to get the crc check for the flash memory I have extended the linker command file in the following way.

SECTIONS
{
   /* Allocate program areas: */
   .cinit           : > FLASHB      PAGE = 0, ALIGN(8), crc_table(_linkerCrcTable, algorithm = CRC32_PRIME)
   .text            : > FLASHB      PAGE = 0, ALIGN(8), crc_table(_linkerCrcTable, algorithm = CRC32_PRIME)
   codestart        : > BEGIN       PAGE = 0, ALIGN(8), crc_table(_linkerCrcTable, algorithm = CRC32_PRIME)
   .stack           : > RAMM1       PAGE = 1
   .switch          : > FLASHB      PAGE = 0, ALIGN(8)
   .TI.crctab        : > FLASHB,        PAGE = 0

   /* Allocate uninitalized data sections: */

#if defined(__TI_EABI__)
   .init_array         : > FLASHB,       PAGE = 0, ALIGN(8)
   .bss                : > RAMLS2,       PAGE = 1
   .bss:output         : > RAMLS2,       PAGE = 1
   .data               : > RAMLS2,       PAGE = 1
   .sysmem             : > RAMLS2,       PAGE = 1
   .const              : > FLASHB,       PAGE = 0, ALIGN(8)
#else
   .pinit              : > FLASHB,       PAGE = 0, ALIGN(8)
   .ebss               : > RAMLS2,         PAGE = 1
   .esysmem            : > RAMLS2,       PAGE = 1
   .econst             : > FLASHB        PAGE = 0, ALIGN(8), crc_table(_linkerCrcTable, algorithm = CRC32_PRIME)
#endif

   .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */

Since the crc_table operator works only on output sections I have currently four separate entries in the linkerCrcTable structure.

 

Is it possible to cluster the output sections in order to get only one checksum for the whole flash memory?

 

Thank you very much

Ralf

 

  • Ralf Bartling said:
    Is it possible to cluster the output sections in order to get only one checksum for the whole flash memory?

    There is no straightforward solution.

    You could consider using GROUP to combine the output sections together, then apply crc_table to that GROUP.  To learn about GROUP, please search the C28x assembly tools manual for the sub-chapter titled Grouping Output Sections Together.  However, this is not how GROUP is usually used, and it may create yet other problems.

    Thanks and regards,

    -George