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.

TMS570LS0432: why link generate CRC value compare the SL_CRC_Calculate is different?

Part Number: TMS570LS0432

Hello 

 Team

my cmd

SECTIONS
{
.intvecs : START( ulFlashStartAddr ) {} > VECTORS
.text : {}palign=8, crc_table(_my_crc_table, algorithm=TMS570_CRC64_ISO) > FLASH0
.TI.crctab : {} palign=8 > FLASH0 /* The CRC tables generated by the linker are created in the special section .TI.crctab */
.const : END( ulFlashEndAddr )
{} > FLASH0
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.STACK_DATA_svc : {. += 10240;} > STACKS, RUN_START(StackModeSVC)
.STACK_DATA_fiq : {. += 1024;} > STACKS, RUN_START(StackModeFIQ)
.STACK_DATA_irq : {. += 1024;} > STACKS, RUN_START(StackModeIRQ)
.STACK_DATA_abt : {. += 1024;} > STACKS, RUN_START(StackModeABT)
.STACK_DATA_und : {. += 1024;} > STACKS, RUN_START(StackModeUND)
.STACK_DATA_sys : {. += 1024;} > STACKS, RUN_START(StackModeSYS)
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM

LOG_DATA : START( ulLOGStartAddr ), END( ulLOGEndAddr ) > LOG
PROFILE_DATA : START( ulPROFILEStartAddr ), END( ulPROFILEEndAddr ) > PROFILE
}

link generate the crc value is different my

 SL_CRC_Calculate((uint64 *)((uint32)&ulFlashStartAddr), ((((uint32)&ulFlashEndAddr)-((uint32)&ulFlashStartAddr)) >> 6))

what reason ?How to modify?

  Thank you

 

  • Hello

     Team 

     link cmd generate the CRC value ,how calculate the length ,means  from the “intvecs to pinit”

    How to write CMD file

  • Hi WHong,

    Te crc_table() operator in LCF generates a CRC value for a given initialized section of code or data. If a crc_table() operator is attached to the specification of a region (an output section, a GROUP, a GROUP member, a UNION or a UNION member), then the linker will compute a CRC value for that region and store that CRC value in target memory. When you calculate the CRC outside the LCF, for example using the SL function, please make sure the same start address and size are used. The address and size are stored in crc_table. 

    Please find more information about calculating crc in linker command file.

  •  SL_CRC_Calculate function  have bugs ,the Wrong parameters,

     OK 

    Thank you