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.

Compiler: Tiv15.12.3.LTS Beaglebone black, cannot execute binary file: Exec format error

Tool/software: TI C/C++ Compiler

Hi,

My PC: 64bits

OS: ubuntu for 64

CCSV6.0

compiler : Tiv15.12.3.LTS

Converted to binary by: "${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"

Question:

When I run the binary in BBB, I got this error message:

-bash: ./TestCCSwithC.bin: cannot execute binary file: Exec format error

Thanks

  • This command ...

    Amin Shamsan said:
    Converted to binary by: "${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"

    ... does not create an executable.  It creates a binary file which is a copy of all the initialized memory segments present at system start.  This is typically used to program flash.  

    I'm no expert on BBB.  I believe it runs a variant of Linux.  That being the case, I expect you would create executables by using the GCC ARM compiler bundled in that Linux installation.

    Thanks and regards,

    -George

  • Thanks George,
    I'm using ubuntu on BBB. ubuntu executes only files compiled with hf . Normally I used GCC . I used Tiv15.12.3.LTS compiler to examine the result.
  • It is not possible to use the TI ARM compiler to create executables that run in any Linux environment, including BBB.  The TI compiler creates "bare metal" executables that presume nothing is running on system start.  Linux executables are different in many ways.

    Please consider seeking help from beagleboard.org.  Or, use the Processor SDK for AM335x Sitara Processors.

    Thanks and regards,

    -George

  • Hi George,

    For long time I'm writing firmware on bare metal. Is there a Ti uController with a memory embedded in , USB and Ethernet   peripheral  + library to support them and custom-made compiler for the uController.

    Thanks.

  • A.Shamsan,

    A microcontroller that has all the requirements you are looking for belongs to the TM4C129x family. It has two development kits (Launchpad and a more featured kit with display) and is fully supported by the software library Tivaware and the TI compiler (as well as GCC). 

    For additional help with this microcontroller I suggest you to look for advice from the experts at the TM4C forum:

    https://e2e.ti.com/support/microcontrollers/tiva_arm/ 

    Hope this helps,

    Rafael