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.

CCS: Generating Hex and binary files in C2000 MCUs



Tool/software: Code Composer Studio

Hello everyone,

I am trying to generate binary files for my project in CCS,

I use the following command as a post build step

${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin ${CG_TOOL_ROOT}/bin/ofd2000 ${CG_TOOL_ROOT}/bin/hex2000 ${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin

the problem is that some sections which are placed in PAGE1 such as .cinit and .econst are not included in the binary file. in fact, i get the following error

warning: section project.out(.econst) at 013a000h falls in
   unconfigured memory (skipped)
warning: section project.out(.cinit) at 013b1e8h falls in
   unconfigured memory (skipped)
warning: section project.out(.binit) at 013c380h falls in
   unconfigured memory (skipped)

I have also tried to use the hex utility but it creates two separate files, one for each page. Then I need to merge them and translate them to binary but this also has caveats as most intel-hex manipulation utilities assume one-byte at every address and thus don't work.

Is there a way I can create a binary which includes both pages in a unified address space and fill the empty locations?

  • I believe you should be able to avoid the warnings (which I suspect are coming from the hex utility) by either modifying your linker command file to put these sections in PAGE 0, or using a hex command file that specifies PAGE 1, something like this:

    ROMS {
    PAGE 1:
    all_mem: o = <origin address of section>, l = <length>
    }

    Hope this helps.

  • Panagiotis Chatzistamatis said:
    Is there a way I can create a binary which includes both pages in a unified address space and fill the empty locations?

    The best solution is to change the linker command file so that all the initialized sections are on PAGE 0.

    Thanks and regards,

    -George