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.

TI-CGT: Linker CRC table for compressed section

Part Number: TI-CGT
Other Parts Discussed in Thread: MSP-CGT

Tool/software:

Hello,

I can't get the linker to generate a CRC table for a compressed section with different run and load addresses.

In my linker file I have:

.custom.data : {} LOAD=FLASH crc_table(CRC_TBL, algorithm=CRC16_802_15_4) RUN=RAM TABLE(CUSTOM_INIT, compression=lzss)

/*          */

.customInit	: {
   		*(.ovly:CUSTOM_INIT)
   	} > FLASH START(CUSTOM_INIT_BASE) END(CUSTOM_INIT_LIMIT) crc_table(CRC_TBL, algorithm=CRC16_802_15_4)

But when I build it, I get:

warning #99922: PROJ.out: accessing the raw data of section ".custom.data" which is uninitialized according to its section attributes; changes to raw data may be lost

In the map file I can see that .custom.data.load is created correctly (I can also see it if I disassemble the ELF file). There is a CRC entry for the .custominit section (the copy table) which is correct. However, the CRC table entry for the section source data is incorrect, it is referencing the run address and run size of the section but it should reference the .custom.data.load section.

Adding a dedicated line on the linker command file to generate a CRC entry for .custom.data.load didn't work.

Any pointers on how to get this to work? I'm presently working with MSP-CGT 21.6.1.LTS.

Thanks!

  • I don't think ...

    a CRC table for a compressed section with different run and load addresses

    ... is supported.  While I check on that for you, please tell me how you think it should work.  For the moment, ignore how it is written in the linker command file.  Please describe what happens at runtime.  Be sure to describe the order in which the different steps occur.

    Thanks and regards,

    -George

  • Ideally the linker would:

    1 - Compress the load-time section data and perform final placement.

    2 - Compute the CRC of the compressed load-time section data and add an entry in the specified CRC table.

    Interestingly, the CRC operator works this way when used on the .cinit section, or an uncompressed section. I'm looking for this same functionality.

    At run-time, I would:

    1 - Perform a CRC verification on the compressed data to be loaded.

    2 - Call the copy_in function to decompress the data and load it into its run-time location.

  • I can confirm ...

    a CRC table for a compressed section with different run and load addresses

    ... is not supported.  To be specific, the "compressed" part is not supported.  I filed EXT_EP-12699 to request this feature be added to the linker.  Please understand this is only a request.  Please do not view it as a guarantee it will be added.

    Thanks and regards,

    -George