Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

TMS320F2800157: How do I merge DSP flash and dcsm OTP data into one burned hex file?

Part Number: TMS320F2800157
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi  TI expert:

Now our power supply products use 2800157 DSP, we use a third-party programming tool to program the bare chip, so we need to use a plug-in to merge the flash data and the encrypted area OTP data into one hex file, how to write the command?

I tried the following method, but found that 2 hex files were generated, which did not meet our assumption, 

-i
-memwidth 8
-romwidth 8

-i APP.out
-o APP_SP6100.hex

ROMS
{
ROMBoot: o=0x100000 l=0x000040000  //flash data
ROMBootOTP: o=0x0F0000 l=0x000000800  //dcsm otp data
}

can you help me?

I read out all the OTP data in the encrypted area of the DSP itself and modified the configuration we need in it, and then put it in the f280015x_dcsm_otp.asm file, so dcsm otp data is ok, and we use out file download is ok.

so, can we generate one hex file wiht flash and OTP data just like we use the out file to burn flash and OTP at the same time?

  • Hi Foriner,

    Do you have the source files that were used to generate the application code .out and the OTP hex file? If so, you could add those source files to a single project and recompile into a single file.

    Thank you,

    Luke

  • I have the source project file, this project file is the data configuration file containing the standard project and OTP, but my difficulty now is how to generate one hex file, using the above configuration command can only generate 2 hex files, because the address of the FLASH space and the OTP space is not continuous, I don't quite understand the method you said

  • Hi Foriner,

    What do you mean by data configuration file? Is this .c code? In a typical CCS project where DCSM settings are used, you would write your .c code and specifiy the DCSM settings in SysConfig, which will generate a dcsm.asm and dcsm.cmd file. Then you could use the .out file to program both the application code and DCSM code simultaneously, however you may need to program in two steps if you are using custom CSM passwords. Let me know if this method is acceptable.

    Thank you,

    Luke

  • I don't think you understand what I mean, my current difficulty is to generate a hex file for burning DSP programs, this hex file needs to contain both flash data and OTP data, this is required by a third-party burner tool, it can't be achieved at the moment, it can only generate 2 hex files at present, and it can't be merged into a hex file, please help provide some suggestions, thank you

  • Hi Foriner,

    I'm able to generate a single .hex file with both OTP and flash data simply by adding the DCSM module to my sysconfig configuration and enabling the hex utility in the project properties. Are you able to do the same?

    Thank you,

    Luke

  • no, we use post-build steps cmd and use "hex2000 xxx.hcf"

    the file contents in "xxx.hcf" is blow, but can not work

    -i
    -memwidth 8
    -romwidth 8

    -i APP.out
    -o APP_SP6100.hex

    ROMS
    {
    ROMBoot: o=0x100000 l=0x000040000  //flash data
    ROMBootOTP: o=0x0F0000 l=0x000000800  //dcsm otp data
    }

    "APP.out" has both flash and OTP data

    What should I do in this case?

  • Let me reassign this thread to our CCS team. I am not familiar with the .hcf file format or all the capabilities that exist via the post-build steps

  • Don't use a post-build step.  The hex utility is integrated into CCS.  To learn how to use it, please see the article Hex utility in CCS.  

    Change the hex command file to something similar to ...

    /* -i  Choose this from the CCS build options for the hex utility */
    /* -memwidth 8  Rely on the default --memwidth=16 */
    -romwidth 16   /* Change from 8 to 16 */
    
    /* -i APP.out               Let CCS supply the input .out file */
    /* -o APP_SP6100.hex        Output files named below */
    
    ROMS
    {
        /* Ranges must be specified in address order */
        ROMBootOTP: o=0x0F0000 l=0x000000800 files={ f1.hex }
        ROMBoot:    o=0x100000 l=0x000040000 files={ f2.hex }
    }

    The comments explain the changes, except for two.

    To understand the changes to -memwidth and -romwidth, please search the C28x assembly tools manual for the sub-chapter titled Understanding Memory Widths.

    Each memory range must specify a different output file.  Unfortunately, that is all the hex utility supports.  Combine those files later.  Perhaps with a third party or open source tool. Or, consider doing it yourself.  Rely on the description of the hex format from the same manual.  Please search it for the sub-chapter titled Intel MCS-86 Object Format.

    Thanks and regards,

    -George