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/CC1310: How to generate binary output on CCS8

Part Number: CC1310


Tool/software: Code Composer Studio

Hello,

I'm searching a way to generate easily binary output on CCS8 because it will more easy to manipulate with other script. I have try to add this command in the post-build step :

${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin ${ProjName} ${ProjName}.bin ${CG_TOOL_ROOT}/bin/ofd470.exe ${CG_TOOL_ROOT}/bin/hex470.exe ${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe

But here is the output :

Finished building target: "gateway_application.out"


bash "/home/aurelien/ti/ccsv8/utils/tiobj2bin/tiobj2bin" "gateway_application" "gateway_application.bin" "/home/aurelien/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/ofd470.exe" "/home/aurelien/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/hex470.exe" "/home/aurelien/ti/ccsv8/utils/tiobj2bin/mkhex4bin.exe"
mkhex4bin failure occurred. Giving up.
makefile:264 : la recette pour la cible « post-build » a échouée

/home/aurelien/ti/ccsv8/utils/tiobj2bin/tiobj2bin: ligne 255: /home/aurelien/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/ofd470.exe: Aucun fichier ou dossier de ce type

It seems that ofd470.exe does not exist.

Best regards,

Aurélien

  • I finally found out the correct commande :

    ${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin ${BuildArtifactFileName} ${ProjName}_XX_YY_ZZ.bin ${CG_TOOL_ROOT}/bin/armofd ${CG_TOOL_ROOT}/bin/armhex ${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin
  • Aurélien

    Thank you for sharing the command that worked.

    Regards,
    John
  • Hi,

    But then, Is it possible to generate an hex file from a binary. Or at least, tell css8 to load my binary file into the flash instead of the hex file.

    Regards,

    Aurélien

  • Aurélien

    It is possible to generate a .hex file from the .out file.  The armhex / hex470 tool is doing that.  CCS actually uses the .out file to load the program to flash.  The .bin and .hex generation are typically used when there is an external flash programmer.

    For example in the pwmled2 example in the cc13x0 SDK by default it just generates the .out that CCS uses.   However in the build options I can check to enable the hex utility and then it also generates the .hex file.

    By default CCS is going to load the .out.  However you can specify to load the .hex file.   You can do this manually by launching a debug session, connecting to the target and selecting load program, browse to the .hex and it will load it.  Just make sure to choose the browse button and not browse project so that it lets you select the .hex file.

    You will also need to load symbols afterwards in that scenario and you would point to the .out file for that if you wish to be able to debug the program as the symbols are in the .out but not the .hex.

    To manually launch a debug session you can open the target configuration view from the view menu.  Find your project expand the project and targetconfigs folder to find the .ccxml file.  Right click on the file and choose launch selected configuration

    Then once the debugger launches click the connect button.  Then click the down arrow beside the load program button and select load program.

    Is there a reason why you want to load the .hex instead of the .out?

    Regards,

    John

  • Hello John,

    Thank you very much for this detailed reply, it is very instructive. Actually, i'm generating .bin file because i want to add some meta data to the file (sha1 ...) and binary files are easier to manipulate with python script. But, then, i would like this file could be automatically loaded when i launch a debug session. But as you already said, i need the symbols to be loaded too if i want to be able to debug, and only the .out file can do this ...

    Regards,

    Aurélien
  • Aurélien

    Let me know if it works for you. You should be able to load the .hex to load the program and the just load symbols from the .out.

    Regards,
    John
  • Finally, i'm using the ".bin" generated to calculate the meta sha1 and then i'm setting my meta structure in the ".out" file. BUt i'm facing an other issue. Indeed, in the ".bin", sections that are not used are filled with 0. Is there a way to avoid these sections to be filled ?

    Regards,

    Aurélien
  • Aurélien

    As it is just a plain binary file the 0 fill is necessary otherwise whatever is reading/using the file will not know where the next section of real data starts. To avoid that you would need to make sure all initialized sections are adjacent.

    Regards,
    John