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/TM4C1294NCPDT: Where to find binary file/ how to generate it

Part Number: TM4C1294NCPDT

Tool/software: Code Composer Studio

Hello,

Before I get to my question, here's a bit of a background.

I took the blinky example and converted it to GCC compiler using one of the Wiki notes I found and I made it work.

I created my own project this time and followed all the settings in the blinky example and made if work with GCC.

I wanted to create a binary file so I copied all the stuff you can find in the Build/Steps tab (that long stuff there that I also found in the build hand book) and copied it to my own project to generate bin file. The build seemed to be successful but I could not find the bin file anywhere in the directory. I did not see any errors in the build. Am I missing something? I am using GCC and not the TI compiler.

I also did an experiment on the blinky example because it came with a bin file in the debug directory. I deleted that file. Then I build again but I can't find any binary file. I was under the impression that I should be able to generate it because the project has already been set up with the correct settings.

Please help.

Regards

AJ

  • If CCS uses the same complex setup for ARM that it does for DSPs the bin is generated in a post build step. I think it only gets generated if any build steps are performed.

    Robert
  • Hi Robert,

    That's exactly what I did. I pasted this under post build step "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    The build was successful but I can't fin the .bin file anywhere in the directories.

    AJ
  • I take back what I just said. The build did finished but looking at console window I see this


    "C:/ti/ccsv7/utils/tiobj2bin/tiobj2bin" "blinky.out" "blinky.bin" "C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/armofd" "C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/armhex" "C:/ti/ccsv7/utils/tiobj2bin/mkhex4bin"
    tiobj2bin.bat failed on C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/armofd
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    tiobj2bin.bat failed on C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-6-2017-q1-update/bin/armhex
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    C:/ti/ccsv7/utils/tiobj2bin/mkhex4bin failure occurred. Giving up.
    ' '
    'C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\bin\ofd470' is not recognized as an internal or external command,
    operable program or batch file.
    File does not exist: at XML_TI_OFD.pm line 877.

    It looks like the generation of the file did not work. Any thoughts on how to fix this?

    AJ
  • The programs armofd and armhex are part of the TI ARM complier tool chain, and are not present in the GCC ARM compiler tool chain.

    It looks like you copied a post build rule from a project set for the TI ARM compiler, instead of for the GCC ARM compiler.

    Rather than use a post build rule, under the CCS 7 project properties you can enable the use of the "GNU Objcopy Utility" to create a binary file when compiling using the GCC ARM compiler:

  • I think I might have solved the problem..

    I went to this link

    processors.wiki.ti.com/.../Tiobj2bin_Failed

    I followed what was written and I was able to see a .bin file after build.

    I'd still be interested to know how I could generate it using the post build step. (What files to use to substitute with armofd and armhex)
  • Thanks Chester. That's exactly what I did.

    Regards,
    AJ
  • AJ,

    This is a "clean" summary I have on the subject:

    Creating .bin files after compiling

    On the project properties, on CCS build -> steps -> post build steps, add:

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}"
    "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd"
    "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    Note: it does not work when there is a space on the project name, and there is no error message in such case, it simply doesn’t create the bin file.

    Note2: sometimes, the “post build steps” does not show up until you “Enable Hex Utility” in build / “ARM Hex Utiliy”. And maybe you won’t find the above configuration if you don’t have “Advanced Settings” shown.

    Note3: the .bin file itself will be in the folder with the same name as the active configuration (the typical Debug folder, for example).

    Bruno