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.

TMS320F280049: Computes the compiled hex file CRC and places the CRC in a specific hex file location.

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi,

    I want to calculate the CRC of the compiled hex file and store the CRC in a specific hex file location.

    Is there a detailed implementation method? It's better to have a reference program.

   Thanks for watching.

  • Hello Zhou,

    What sort of CRC are you using? Are you using VCRC, CLA background CRC, or something else?

    Best regards,

    Omer Amir

  • Hello Omer Amir,

            The CRC is edb88320.

            I want to calculate the CRC for the entire hex file, not just the FLASH data, and store the CRC in the hex file at the specified location.

           Do you have any reference plan?

           Best regards,

           Zhou Yinfeng

  • Hello Zhou,

    Apologies since I don't know much about CRC, but is this some type of CRC? Are you using part of the device such as CLA or the VCU to implement this or is this your own implementation that you're running on the device or your PC? This will help me determine what expert can help support this.

    Best regards,

    Omer Amir

  • Hello Omer Amir,

          Edb88320 is one of the algorithms of CRC. I hope that DSP can automatically generate the CRC when compiling and generating the hex file, and store the CRC in a specific location of the hex file, mainly in order to perform integrity check on the hex file data during upgrade and avoid upgrade failure. Also, is there third-party software that supports this requirement?

    Best regards,

    Zhou Yinfeng

  • Hello Zhou,

    I will ask our software team about this and try to get back to you later this week.

    Best regards,

    Omer Amir

  • Hello Omer Amir,

         OK,thanks.We hope you can help us solve this problem. Our team attaches great importance to this problem and hopes to solve it in the product development stage.

    Best regards,

    Zhou Yinfeng

  • Sure, no problem.

  • Hello Zhou,

    There is a linker command file that you can use which does the CRC for the entire Flash, you can refer to that and let me know if this is what you're looking for and if you have further questions.

    C2000Ware_5_00_00_00\device_support\f28004x\common\cmd\28004x_generic_flash_lnk_crc.cmd

    Best regards,

    Omer Amir

  • Hello Omer Amir,

         I want to calculate the CRC of the entire Hex file, which has a special data format that is somewhat different from Flash data.

    Best regards,

    Zhou Yinfeng

  • Hello Zhou,

    I discussed with some other experts and this is what they have informed me:

    You can refer to the example provided in the C:\ti\c2000\C2000Ware_5_00_00_00\libraries\dsp\VCU\c28\examples\crc\2837x_vcu0_crc_wtables example folder (this project uses VCU0, so it should be relevant to your application). The F2837xD_VCU0_CRC_lnk.cmd file provided in the example should be useful to you.

    However, there are some points which cannot be addressed at this moment.

    • For VCU0 the CRC polynomial is fixed to 0x04C11DB7 (on newer devices this is configurable)
    • It's uncertain whether the linker file is even capable of computing the CRC over the entire .hex file and not just the Flash data
    • We don't have an example of placing the resulting CRC in a specific location in the .hex file

    Best regards,

    Omer Amir

  • Hello Omer Amir,

    This demand is very important and our team attaches great importance to it. Could you please ask your technical team for help to meet our demand?

    Best regards,

    Zhou Yinfeng

  • Hello Zhou,

    I have already confirmed with some other experts, the linker file example does not do the check over the hex file and currently there is no tool to implement this; this would need to be something custom such as a PC-level application for computing the CRC on the hex utility. Neither the software team or the applications team have any scope to implement a tool like this, so unfortunately there is no software or application we can provide in this instance. I can make note of this for something in the future, but there will likely not be a software developer available to make something like this for a while.

    Best regards,

    Omer Amir

  • Hello Omer Amir,

    My purpose is to determine the integrity of the hex file. Here is a bold idea: Use the MD5 checksum tool to generate an MD5 hash value and compare it with the hash value of the hex file. Do you think the idea is feasible?

    Best regards,

    Zhou Yinfeng

  • Hello Zhou,

    Based on what I understand from your requirements, that seems like it should work. Please try it and let me know if you need further help.

    Best regards,

    Omer Amir