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/CCSTUDIO: Generating a binary output file

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

How do I get code composer to generate a binary output file of bytes that represent the image of my program for my boot loader?

  • Hi,

    The generation of the binary file is done as a post build step as mentioned in section 3.2.4 of the reference below:

    processors.wiki.ti.com/.../Projects_and_Build_Handbook_for_CCS

    The relevant step is copied below so you can easily paste into your project.

    "${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"

    Keep in mind that, depending on the device being used, you will have to replace both "armofd" and "armhex" with the equivalent utilities of the compiler you are using.

    Hope this helps,
    Rafael
  • I assume this script you have supplied goes on the Project/Preferences/MSP430 Hex Utility command line.  Since I can find no environment variable labeled BuildArtifactFileName, I will further assume that I must add this variable.  What does that line look like. You mention that I must adjust the script for armofd and armhex.  I have no idea what armofd is or could be replaced by.  I assume that armhex would be replaced by hex2bin but find no utility in the ti folder named hex2bin.  I appreciate your effort but I don't speak make file lingo if that is what this is.  This was so easy with IARs IDE.  Why is this so hard in CCS?  Yes, I am frustrated.  It only took me about 8 hours to convert two programs from IAR's development system to compile and link in CCS.  But now I have spent 8 hours trying to figure out how to get my output from .out to .bin.  This should be a thirty second procedure.  Again, thanks for trying to help but this only gets me a little closer to a solution.  From you answer I at least  know I must read and understand the ti's "$script language"(<:.

  • DaveG said:
     Since I can find no environment variable labeled BuildArtifactFileName, I will further assume that I must add this variable.

    If you look in the CCS project properties under Build -> Variables and tick the "Show System variables" tick-box, the BuildArtifactFileName variable should be shown. E.g.:

    I think BuildArtifactFileName is a variable automatically added by Eclipse.

  • I am still working on exactly where to paste this and not being familiar with armofd and armhex, I don't know what the replacement is for the MSP430. I am guessing that I need a hex2bin utility to replace armhex but will let you know if I figure out what I replaced it with and where I added the script. Thank You.