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.

TMS320F2800137: Properly generating a binary file

Part Number: TMS320F2800137

Tool/software:

Hi all,

I'm a bit confused.


i read on the forum that tiobj2bin is not supported for EABI compiled projects. However, in a current project for the TMS320F2800137, which is compiled as EABI, an old version of the tiobj2bin.bat works. Works in the sense that it generates a binary that I can flash and run.

Now I'm integrating bitbucket pipelines for this project to automatically build the project on commit. This works nicely. Now I've been using the utils from ccs 12.8, and these don't work. An error comes up

‘C:’ is not recognised as an internal or external command, operable program or batch file.

Now I've been reading the forum, and see that there are two options.

Use C2000 Hex utility in CCS. This can be used in combination with -image mode and a roms directive. This roms directive can be made with a static start and end, these do not change per build. However, in this case you get a lot of holes because it converts a whole section. This can be solved by splitting the sections.

Or, find the start and end in the folder file, but these change per build, so this seems impossible to use.

So what is the right way, that works without much maintenance and doesn't generate holes in the image?

Thanks in advance.

Edit;

On this page I read that a user used a third party tool. What is this third party tool and can someone guide me to use this? I read that we have the same problem. I find it weird that this is not fully supported, and without work-arounds, by code composer studio out of the box...

e2e.ti.com/.../5195270

  • Hello,

    I have brought this thread to the attention of the compiler experts for further comment.

    Thanks

    ki 

  • Please see if the utility that flashes memory accepts input in forms other than a binary file.  If so, changing to some other format is probably the best solution.  The rest of this post presumes you need to create a binary file.

    For the most complete description of this situation, including a workaround, please see this forum post.  Note how the workaround has two variants.  You could use the first variant during the early stages of development.  As development nears the end, you could change to the second variant.

    For more understanding about ...

    ‘C:’ is not recognised as an internal or external command, operable program or batch file.

    ... please see this forum post.  

    I read that a user used a third party tool. What is this third party tool

    I don't know.  That customer never says.  I'm aware of an open source tool named srec_cat that can convert between lots of hex file formats.  It might be able to convert hex to binary.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for the reply. I will check with my collegues who develop the firmware update tool if .hex can be used and if there are any drawbacks (or maybe advantages).

    Just to sum up the problem for myself (and others reading this).

    - There is no out of the box tool for C2000 EABI .out files to convert it to binary (Only .hex using C2000 Hex utility)

    - Converting the .out file to binary is possible using C2000 Hex utility in two ways, where both ways have a drawback. Or a large binary file, or having to modify a file at every build.

    - srec_cat can be used, but not sure...

    Now I'm just wondering... Without knowing about the incompatibility, I've converted a program using a old version of tiobj2bin, which converts properly and runs on the TMS320F2800137.

    Why isn't tiobj2bin compatible with EABI compiled programs if it seems to convert and run properly?

  • Why isn't tiobj2bin compatible with EABI compiled programs if it seems to convert and run properly?

    The beginning of this forum post details the conditions under which older tiobj2bin fails.  When that failure occurs, there is no diagnostic to let you know it happened.  The failure is discovered much later, when the program doesn't start, or something along those lines.  That being the case, tiobj2bin was updated to detect the problem combination of EABI and C2000.  When that combination is seen, a diagnostic is issued, and no binary file is output.  

    If you use the older tiobj2bin on a C2000 EABI build that does not have the problem conditions, then it will probably work.  But the flaw in older tiobj2bin is still present, ready to cause problems at any time.

    Thanks and regards,

    -George

  • Ah, I've just read your comment on the other post regarding the "Why?".

    If the system is C28x, built for EABI, and at least one section has a different load and run address, then it is possible the load address for such a section may be computed incorrectly, and this eventually leads to the binary file being wrong.  In your particular case, the binary file starts with a large number of bytes with value 0.  That is but one way the problem may present itself.

    My questions have been answered. Thanks!