MSPM0L1306: CRC calculation in combination with linker generated and store crc checksum in hex file, read CRC resul in C code

Part Number: MSPM0L1306


Tool/software:

Hi Support team:

I want to implement CRC calculation and store result in HEX file with updated .cmd file. Then read out CRC result in C code.

I change content in .cmd file, see red in first picture. The CRC content _flash_crc is in .map file, see red in second picture.

But _flash_crc does not have content in debug state, see third picture.

I reference chapter 10.9 of complier user manual. Is there other references? thanks

br

johnny

  • Hi Bian,

    I super apologize that you have not received a response to your questions.

    Let me take a quick look into this for you and get right back with an answer.

  • Hi Bian,

    Ok, again, sorry for the delay. 

    Looking back through your code I see the CRC_TABLE, which should come crc_tbl.h, so not exactly sure why the CCS can't display _flash_crc as a struct as I did in my example I put together (see below). You can see the _flash_crc_table in the expressions window. IDE.

    Just a note -> In the linker cmd file you shouldn't use type=copy as this prevents the CRC from being placed in memory

    Do this instead

    Check out the attached pdf, slide 4 for a complete view of my CCS if that helps.  Let me know ... I can post my code also.

     Linker Generated CRC example.pdf

  • Hi Dennis,

    Thanks for your so detail explain. I comment 'type = COPY' in .cmd, so the result of MEMRANGE_CRC_TABLE in expressions window. IDE now.

    But the value is wrong.

    BTW, I use CCS 12.4, CLANG 4.0.1