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.

Compiler/TMS320F28377D: How to generate two .bin file from one project

Part Number: TMS320F28377D


Tool/software: TI C/C++ Compiler

Dear Champs,

Our customer has a large .bin file that might over Flash size.

So they hope to separate this as two .bin files, one is on internal Flash, another is on external Flash.

Is this thinking workable?

And how to operate it on CCS? 

Please feel free to let me know if any suggestions.

Thanks a lot.

  • It is possible to direct the hex utility hex2000 to convert an executable file into multiple binary files, one file per memory range.

    For background, please search the C28x assembly tools manual for the sub-chapter titled Image Mode and the --fill Option.

    Add a hex utility command file to the CCS project.  Model it on this one ...

    /* rom_commands.hex */
    
    /* Presumes use of the following hex2000 options */
    /* --binary  */
    /* --image   */
    
    ROMS
    {
        INTERNAL_FLASH : o = 0x2000, l = 0x4000
               files = { internal_flash.bin }
    
        EXTERNAL_FLASH : o = 0x8000, l = 0x4000
               files = { external_flash.bin }
    }

    In your hex utility options in CCS, enable the options --binary and --image.  For details on adding this hex utility command file to the project, please see this forum post.

    The memory ranges defined in this ROMS directive are similar to the ones in the linker command file, but with an important difference: The addresses and lengths are doubled.  For details, search the same manual for the sub-chapter titled TI-TXT Hex Format.  That sub-chapter describes why the addresses and lengths are doubled when using TI-TXT format, but it is the same for binary format.

    The output of the hex utility is written to the files named for each memory range in the ROMS directive.

    Thanks and regards,

    -George

  • Dear George,

    Thanks for your reply.

    I will work with customer to follow your suggestion to test it and ask the help if meet any problems.

    Thanks a lot.