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.

.out file convert to bin (out -> hex -> bin)

Other Parts Discussed in Thread: TMS320F28335, DM3730

Hello, everyone.

In order to peform field upgrades of embedded systems in the field,
I would like to be able to download .out files to a target system (via a serial port for example) then use the Flash API to program the DSP with the new version our software. The JTAG ports will not be accessible on systems in the field so I needed to find another method for upgrading software stored in the flash.

I 'd like to know How to generate .bin file.

After Build, size of .out (COFF) is 431KB. Using Hex2000, I got 178KB Intel Hex file.
Hex2000 command was " hex2000 -romwidth 16 -memwidth 16 -i -o test.hex test.out "
output Hex file is 32-bit format like this..

:020000040033C7
:200000008F300000761F03EB06C41E00761F03EA8F30000206C41E0E761F03EA8F30000438
:2000100006C41E0C761F03EA8F30000606C41E0A761F03EA8F30000806C41E10761F03EAE0
:200020008F30000A06C41E04761F03EA8F30000C06C41E02761F03EC8F30000E06C41E0299

And then, I Used Hex2Bin.exe. I got 64KB binary file.  But that bin file is 16-bit data only.  Half of Data is gone.
I guess Hex2bin.exe convert only 16-bit (not 32-bit).

Also, can anyone point me to information related to:

1) How to *.out file convert to *.bin file directly

2) Can I get a Program of 32-bit Intel Hex to Binary file. 

Any links to source code or command examples would be appreciated!

Thank you in advance.

  • I think something that needs to be considered is how you will interpret the .bin file after you get it.  Specifically, the bin file has all the address info stripped from it.  In other words, in order to use the bin format it's required that all of your data be in one contiguous image.

    FYI, there is a -b option built into the hex conversion utility from TI, so you don't even need hex2bin.  However, you'll still need to have your code/data in one contiguous block.  You can use the -image option to generate an image of your code.

  • This TI hex conversion utility is called hex470.exe which can be used with the -b option to generate .bin file directly from .out file. It has additional options which may help you to configure your file as your requirements.

    Refer this -

    http://processors.wiki.ti.com/index.php/Secondary_Bootloaders_on_OMAP-L1x

    Regards,

    Sid

  • Thank you your advice~

    but when I use -b option, there were warning and .bin file has no data.

    Warnings are like this.
    warning : section '.text' at 0660000h falls in unconfigured memory <skipped>
    warning : section '.cinit' at 066f3fch falls in unconfigured memory <skipped>
    .
    .
    .
    .

    I used this cmd file, 

    -b
    -memwidth 16
    -o=10122.bin

    ROMS
    {
      FLASH          : origin = 0x330000, length = 0x00FF80, romwidth=16
    }

    Could you tell me how to  eliminate  those warnings?
    Thank you guys.

     

  • Thank you your advice~

    but when I use -b option, there were warning and .bin file has no data.

    Warnings are like this.
    warning : section '.text' at 0660000h falls in unconfigured memory <skipped>
    warning : section '.cinit' at 066f3fch falls in unconfigured memory <skipped>
    .
    .
    .
    .

    I used this cmd file, 

    -b
    -memwidth 16
    -o=10122.bin

    ROMS
    {
      FLASH          : origin = 0x330000, length = 0x00FF80, romwidth=16
    }

    Could you tell me how to  eliminate  those warnings?
    Thank you guys.

     

    1. You should probably use the -image option so that you get one big chunk of data to program instead of little pieces scattered all over.
    2. Your ROMS memory range should reflect the physical memory locations you are planning to program.  I don't know which device you are using so I cannot tell you the correct values.
  • Thank you in advise.

    I use TMS320F28335..
    How To use the - image option?

    Could you give me examples?

  • Eunra,

    Now that I know you're using F28335 it looks like your last bit of code was more or less correct aside from not having the -image option.  Can you attach your map file to a post (click on the "Options" link to attach a file)?

    I would guess one of 2 things is happening

    • Your linker command file is incorrectly allocating code to the memory range mentioned (0x660000). -OR-
    • There is a syntax issue related to the different memory pages.

    Brad

  • Thanks Brad,

    I attached CMD file, but the *.cmd file couldn't uploaded, so i change file extension *.cmd -> *.txt.

    And I used  this cmd file through hex2000..
    ====================================================
    -b
    -memwidth 16  <--- ( or 8)
    -o=10122.bin

    ROMS
    {
      FLASH          : origin = 0x330000, length = 0x00FF80, romwidth=16
    }

     

  • hi,

    could you please tell me where to write this hex command file and how to link that to project? i am using ccsv4 (code composer studio)

  • Eunra,

    I wanted to suggest this application note as a resource.  It was written with the 281x in mind, but will apply to the 2833x as well in concept. 

    TMS320F281x Boot ROM Serial Flash Programming  www.ti.com/lit/SPRAAQ2

    Associated code: http://www-s.ti.com/sc/techlit/spraaq2.zip

    In the source code you will find the input to the hex2000 utility: \code\CKFA\Debug\CKFA_hex.cmd Command line input to hex2000.exe

    Hope this helps

    Lori

     

  •  

     

    hey people,

     

    could anybody give me a shot of how can I create a *.bin file from an *.hex file??  Where I put the -b with hex2000?

     

    thanks

  • Hey Brad

     

     What convertor should I use to convert .out(generated using ccs4) to bin file(I am using DM3730)

     

    regards

    shashank

     

     

  • Hello Brad 

    Even after build without error i can not get .hex file ... pls give suggestion if you have...