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.

.o file and firmware (executable)

Other Parts Discussed in Thread: TUSB9261

Hello. When I was developing code in CCS v5 for an ARM cortex based board called TUSB9261 EVM board, I build the whole project in this environment and acquire the binary .o file. But I have difficulty linking this object file to generate the executable firmware for the board using CCS. Can anyone help go through any procedures in CCS for this? Thanks.

  • Hi Chen,

    Can I please confirm whether you did your build for COFF or ELF format?  This makes a difference in the code file generated by the build.

    Please let me know and we will go from there.

    Best Regards,
    Lisa

  • I am not sure about the TUSB9261EVM board itself whether to use COFF or ELF. But from the ARM processor standpoint, ELF format is preferred and is supposed to work on most devices.

  • Hi Chen,

    actually one of the reasons I ask is because it seems you are looking for an ELF format file.  The result of the build, which you can load or convert to a hex is always a .out file that you would typically find in your projects Debug or release folder.

    Does this help?

    In you debug you can load this .out file. 

    This wiki topic might also be interesting for you.

    http://processors.wiki.ti.com/index.php/Combining_executable_files

    If you still have questions, please let me know.

    Best Regards,
    Lisa

  • It may seem a stupid reason why I feel there is a problem. When I download the sample firmware from the TI official site, the firmware file is in bin format and does not have .o extension.

    So when I try to write the firmware using TUSB9262 firmware burner utility, the burner actually does not recognize the .o file in the file browser. I am not sure it is safe to force write the .o file by manually changing .o to .bin. (.bin is the extension for sample firmware)

  • Hi Chen,

    I just downloaded the burner utility (latest version) and this utility seems to have no problem handling the firmware also provided on the same website.   I would have to see if I can track down hardware or a colleague, but that I can tell the burner can handle the .bin files we provide.

    I am not sure what problem you have?

    Best Regards,
    Lisa

  • It seems there is misunderstanding. The sample firmware on the website is working perfect with no problem. What I am inquiring is that whether it is capable of handling .o file that is compiled from CCS. Because you told me .o is the executable firmware for the board, but the burner does not recognize .o extension, so I am not sure if it is OK to change .o file to .bin and burn it to the hardware. Sorry for any confusion.

  • Hi Chen,

    CCS produces a .out file, not a .o file.

    There is actually a command line utility I believe to help you convert the .out to a .bin, however some of these might be device specific.  Here is one you may want to try (after backing up your files of course)

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/90240.aspx

    Please keep me posted.  If this does not work I may need to see if I can find a colleague to help me with this.

    Best Regards,
    Lisa

  • I have to say the file CCS generated after I build the whole project is a .o file. What I did is in the project menu, click "build project". After that, a binary file in the project explorer was generated. I have attached a picture about this.

  • Hi Chen,

    this could just be a poject setting that you get a .o file.   Have you managed to try the following utility to create the .bin file?  If not please give it a try.

    C:\CCS\4_2_4\ccsv4\utils\tiobj2bin

    C:\CCS\5_1\ccsv5\utils\tiobj2bin

    Best Regards,
    Lisa

  • Are these utility used in command line mode or we execute them in CCS environment? Could you tell me something about the command line format if needed? Thank you.

  • Hi Chen,

    if you look at the bat file there is information there on both implementing this as a manually added post build process in CCS as well as from the command line.

    From the command line you would do

    tiobj2bin convertthisccsoutput.out tothisbinfile.bin

    Note you will need to generate a .out, and as I seem to find it the default in my usage of CCS I am surprised you have a .o.

    Please keep us posted if you require further assistance.

    Best Regards,
    Lisa

  • Hello. I spent some time working on the Linux version of CCS v5. Yes I did have a .out file with exactly the same size as the .o file on Windows.

    I would try to utilize the utility you mentioned to see if it works. I'll keep you posted if I have more questions. Thank you very much for your help and patience.

  • Hi Chen,

    just thought I would double check whether you got the utility working ok and whether there is anything further with this enquiry at the moment.

    Best Regards,

    Lisa

  • I spent some time figuring out that output file format is modifiable as an environment setting in CCSv5.

    So changing that {".o"} to {".out"} solves the problem.

    Also I tried the two utilities you suggested and it works to convert from .out to .bin.

    I burned the .bin to TUSB9261 board and the firmware successfully runs.

    Thank you very much for you concern about my problem. I would consult for more questions if I encounter new problems in my project.

  • Hi Chen,

    great, glad to hear and all the best with the development.

    Cheers,
    Lisa