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.

Error while trying to convert HEX to BIN using FileIOShell.exe

Other Parts Discussed in Thread: TMS320F28335

Hello,

In our build process, in order to eventually get a binary image to be downloaded into a TMS320F28335 DSP Flash, we use two steps:

1) Convert the COFF (.out) file generated by C2000 compiler, into an HEX file through hex2000.exe utility;

2) Convert the HEX file into a binary image file through FileIOShell.exe utility.

While trying to build, after increasing in the ROMS directive (linker command file for hex2000.exe utility) the physical memory length, I got an error message box from FileIOShell:

"MotHexToBinary function failed, index out-of-sync".

As I don't have FileIOShell.exe source code and the help is really useless I cannot figure out where the problem is.

Any help would be greatly appreciated.

Paolo

  • Hi,

    I have found the same issue working with the FileIOShell.exe utility.

    I have found this problem using the 28335 device, including a ROM image starting from sector B to F. (len = 0x28000)

    Have you found a solution to the problem? (maybe an alternative motorola-s to bin converter)

    Thank you in advance

  • The solution was to simply write my own converter. I did it in C# and Visual Studio 2010 as a console application.

    Fortunately, the HEX format is very well documented. I suspect, although it's not confirmed, the problem could have been a 16-bit index overflow or something similar.

    Paolo

  • yes, I think it's a "64K" limit on the file dimension...

    I have try this : "http://www.s-record.com/". It seems to produce a different result compared to the "FileIOShell.exe" result.

    Maybe for the 16bit align.

    Is it possible to have your source code? Unfortunately, I don't have the time to write the console application in c# ;-)

  • Update: maybe I have found a solution...

    I have try to "segment" the process.

    For example, the HEX2000 + FILEIOSHELL are used from location :

    origin = 0x300000, len = 0x8000, romwidth = 16, fill = 0xFFFF

    and produce a result (FILE_1)

    I have try to reduce the "len" to 0x4000 and I move the origin in order to produce 2 different  files (hex + bin):

    origin = 0x300000, len = 0x4000, romwidth = 16, fill = 0xFFFF

    origin = 0x304000, len = 0x4000, romwidth = 16, fill = 0xFFFF

    At the end of the "COFFtoBIN" file, I have introduced a "Copy /b" instruction, In order to "concatenate" the different bin files in a single file (FILE_2)

    FILE_1 is equal to FILE_2... I think the same process can be re-used, in order to produce a single "sector" (hex+bin) file and then it's possible to concatenate the files, in order to produce a final ".bin" result.

    Do you think is a good idea?

    Thank you in advance

  • I guess it might work. Can't see why it shouldn't. Remember to test it thoroughly before completely relying on it.

    Unfortunately I can give you neither the executable nor the source code since the company I'm working with owns them (intellectual property).

    Good luck with your solution.

    Paolo

  • it seems to work!

    I have allocated the .text on F-E sector and a looong const on D-C-B sector.

    The .bin file is loaded using a "custom" updater.

    Also, loading the .out symbols in the debugger, the Program is syncronized with the loaded .bin file

    Using the FileIOshell without using a custom "parser" for the Motorola=>Bin conversion, definitely save my time!

    Ciao e buona giornata ;-)