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.

generate encrypted hex file in C2000

Other Parts Discussed in Thread: CCSTUDIO, CONTROLSUITE

Hi

In CCStudio, we can generate a hex file from the project and flash it to the controller.

In my application, I want to store the hex file in an external eeprom and then flash it to the controller flash.

Can I generate an encrypted hex file so as to protect it from reverse engineering when present in the Eeprom?

I came across an application called C2Prog to generate .ehx file which I understand is an extended hex file for encryption. I need to work on it further.

C2prog -   http://www.codeskin.com/programmer

Is that the correct way or is there any other way ?

Attached is the user guide for c2prog

hex,ehex_file.pdf

Thanks In Advance !

Smita

  • Smita,

    You can try using HEX2000 utility to generate HEX file needed. This utility comes along with your CCS install and can be found the following directory:-

    <CCS_INSTALL>\tools\compiler\c2000_6.2.9\bin\ (again, C2000_6.2.9 refers to compiler version 6.2.9, look for similar directory in your CCS install)

    Please refer to www.ti.com/.../spru513h.pdf for more details.

    Regards,
    Manoj
  • Hi

    Extremely sorry for the very very late reply. Thank you for the info.

    The link above is for a normal intel hex file. What I am looking for is a standard format encrypted hex file generated by CCS

    If i need to encrypt it and do an OTA upgrade using the encrypted hex file, is there a standard encrypted hex file format that can be generated from CC Studio ?

    If yes what would be the procedure ?

    Thanks In Advance !

  • Hi Smita,

    You can use CSM to do that.

    Regards,
    Gautam
  • Hi

    Thank you for the reply.

    We have used CSM for the Bootloader, so that is safe.

    We upgrade the MAIN APP over the air, and store it in an external memory. Once the file is confirmed to be correct, it is flashed into the DSP.

    There could be 2 ways when the file can be hacked-

    1) Reading the external memory contents

    2) Tracing the packets when they are transmitted/received in the communication channel.

    To avoid both the above and secure the file, does TI provide standard encrypted format of a hex file, OR convert the hex file to an encrypted one ?

  • I did come across C2Prog, that would convert the hex file to ehx file.
    To the best of my understanding, that is mainly used for distribution purposes (could be to the Contract Manufacturer, external vendors etc). As such as the file did not have a specific format which could be flashed using the Bootloader OTA, so as such I could not understand, how I can flash it with the existing Bootloader developed.
  • Hi Smita,

    We do not have a solution right now to be able to load and flash an encrypted file with the bootloaders. C2prog / Codeskin does have a solution for this.

    However, we do have source code available for the serial_flash_programmer and flash kernels in controlSUITE that can be modified to support your encrypted firmware upgrade. You can load a flash kernel into RAM of the device and use that kernel to load an encrypted application, decrypt it, then program it into flash.
    Serial Flash Programming of C2000™ Microcontrollers: http://www.ti.com/lit/sprabv4

    You can also look at these E2E threads:
    e2e.ti.com/.../1349813
    e2e.ti.com/.../1351104

    Best Regards,
    sal
  • Hi

    Thank you for the reply.

    I will check and see how it would help.
    It may take sometime by the time i check it.


    Thanks & Regards
    Smita