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.

"C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin" failure occurred. Giving up. -- Post compilation error while trying to generate a binary output file

Hi All,

As stated in the title, I am trying to generate a binary output file for my TMS570LC43xx project. I am currently using TI CCS v6.1.1.00022, ARM compiler version T v5.2.6.

I am able to compile my project just fine, but the post compilation conversion from the .out to .bin file keeps blowing up. Here is the meaningful console output (since this project is huge and the console output is very long):


'Finished building target: Target 3 FEE Enabled.out'
' '
"C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "Target 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
"C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin" failure occurred. Giving up.
' '


**** Build Finished ****


My co worker is able to get his project to work with compiler version T v5.2.5, however I have not been able to find a compiler download for that version. If someone could direct me to the ARM T v5.2.5 download that would be awesome! As I would like to try that before moving on to anything else.

- Warren

  • What data format is in your .bin file? In your post, its eems that the error occurs when converting the content for the fee section. There is an address gap between the main flash banks and the EEPROM bank. if your .bin file requires continuous address, you may need to generate separate .bin files for the main bank and EEPROM bank.

    Thanks and regards,

    Zhaohong
  • Zhaohong,

    How can you tell that the error is occurring when converting the content for the fee section?

    - Warren

  • From your post.

    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "Target 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin" failure occurred. Giving up.

    Thanks and regards,

    Zhaohong
  • Is it from this line, "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "Target 3 FEE Enabled.out" "HerculesTarget3.bin"?

    "Target 3 FEE Enabled" is just the project name. I am not sure I see anything specific in that output line that indicates the FEE portion of the project is causing the failure.

    - Warren
  • As I explained earlier, most binary data files does not contain address information. The tool expects the data has continuous address. If you want to put data in the Flash mainbank and data in the Flash EEPROM bank into one such binary file, the tool will not take it because there is a gap in the address between the two banks.

    Thanks and regards,

    Zhaohong
  • I understand, and thank you for pointing that out. However we are not writing any data to EEPROM directly from the .bin file. The entire application program memory is written into the Flash mainbank and is restricted to the addresses 0x00020020 to 0x00200000. All data is written to the lower RAM segment from 0x08015000 to 0x0807FFFF. I will attach the .map file to show where everything is being stored. 

    Please be aware that we are not populating the reset vector on purpose. Our application uses a custom bootloader that lives in the lower segment of FLASH unpopulated by our application.

    2620.Target 3 FEE Enabled.txt.txt

  • From the map file, you should be able to create the binary file. the following forumthread may provide you with usefull information.

    e2e.ti.com/.../190375

    Thanks and regards,

    Zhaohong
  • Zhaohong,

    Just checked the post you linked, I have verified that my post build instructions are set up correctly. Here they are again:

    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "$hHerculesTarget3.bin" "${CG_TOOL_ROOT}/bin/ofd470" "${CG_TOOL_ROOT}/bin/hex470" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    I still get the same error message.. not sure if this is an error with the 5.2.6 compiler .out file format or something..

    - Warren
  • I would suggest first generating the .out file and then generate the binary file in the command line window. Hex470 is an independent utility.

    Thanks and regards,

    Zhaohong
  • I use ti-cgt-arm_5.2.6 and create bin files w/o any errors. My command line below. Looks what problem not related to compiler version.

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

  • So I ran the Hex470 utility out of the command line window. Here is my argument to the command line:

    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "C:/Users/Arthur/Desktop/imdextechnologyswrd/trunk/Firmware/Navigation Processor FW/HerculesTarget3/ReleaseTarget 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"

    I get the following error message from the Hex470 utility.

    "The application was unable to start correctly (0xc0000142). Click OK to close the application"
  • Can you try to create one file each time running hex470?

    Thanks and regards,

    Zhaohong
  • Hmm, not sure what you mean. Isn't Hex470 only creating one file? It is taking the .out and converting it into a .bin.
  • "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "C:/Users/Arthur/Desktop/imdextechnologyswrd/trunk/Firmware/Navigation Processor FW/HerculesTarget3/Release/Target 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"

    Okay, through the command prompt I have found what I think may be the problem. The call to ofd470 -> "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/ofd470" fails because in the directory "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin" there does not exist an executable ofd470.
  • Please try using armofd.exe, armhex.exe etc instead of *470.

    Again, this string is working in latest CCS & latest TI compiler.

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

  • "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}"
    "$hHerculesTarget3.bin" "${CG_TOOL_ROOT}/bin/armofd.exe" "${CG_TOOL_ROOT}/bin/armhex.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    Just tried the above through CCS, no luck. Here is the console output.

    'Finished building target: Target 3 FEE Enabled.out'
    ' '
    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "Target 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/armofd.exe" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/armhex.exe" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin" failure occurred. Giving up.
    ' '

    **** Build Finished ****
  • I found the the following link with information about the tiobj2bin failure.

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

    I will discuss with my coworkers about this topic after everyone comes back after New Year.

    Thanks and regards,

    Zhaohong
  • Please try this in Post-build steps::

    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470" "${CG_TOOL_ROOT}/bin/hex470" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    I used this in CCS6.1.0.xx, and generated bin file without any error:

    TI ARM C/C++ Compiler v5.2.2

    Tools Copyright (c) 1996-2015 Texas Instruments Incorporated

    <Linking>

    'Finished building target: rti_test.out'

    ' '

    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "rti_test.out" "rti_test.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"

    ' '

    **** Build Finished ****

    Regards,

    QJ

  • QJ, thanks for the reply. Unfortunately I was using 5.2.2 when all this trouble started. Here is my console output.

    'Finished building target: Target 3 FEE Enabled.out'
    ' '
    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin.bat" "Target 3 FEE Enabled.out" "HerculesTarget3.bin" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/ofd470" "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/hex470" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin" failure occurred. Giving up.
    ' '

    **** Build Finished ****
  • Is there any way I could get a link to download compiler version 5.2.5?

    - Warren

  • I ended up doing a full uninstall and reinstall of CCS, this seems to have fixed the issue.