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 and hex2000

Other Parts Discussed in Thread: TMS320F28377D

Hi everybody,

I want to ask something about contents of a .out file that ccs generate. I am using the tms320f28377d and burning the flash via sci. When I convert the .out file to .hex format How could I find that which part of the hex format is .pinit or .cinit etc.
There are many sections defined in cmd file and every section has its own adress. For example .cinit is in FLASHB while .econst is in FLASHF. And while it is being written to the DSP every section goes to its own place.
I mean how could the ccs says that this part goes to FLASHB and that part goes to FLASHF?

I am triyng to send the hex file via SCI myself without using any tool like c2prog or serialflashprogrammer. I converted the out file to hex format and I use the flash api library to delete the flash of the device successfully. I moved all the code to RAM therefore when I delete the flash the code is not affected.

But  I am stuck wtih something. How can I divide the .hex file into .cinit , .text , .ebss ....  sections to send them into different memory locations? I mean, I will write the corresponding .cinit section to FLASHB adress and .pinit section to FLASHC using f021 flash api library.

What is the content of the hex file and is there a way to convert these sections seperately ?

I hope I could express myself clearly.

Thank You.

Have a nice day.

  • The linker maps code and data to the sections specified in the linker command file. You can loop at the .map file to see where each section is getting mapped to in the memory ad well as its size in the memory.

    In order to flash the contents of the hex file into the memory address you want, you will need to build your application for flash and customize your linker command file to place the memory section in the desired location. For example, build your application with .cinit :> FLASHB and .pinit :> FLASHC. The hex file does not have any tags or specific information about what section is mapped to where. It is simply a COFF executable file converted into a format which can be sent to peripherals. Please see the BootROM and Bootloader section of the F28337xD Technical Reference Manual. The hex file consists of some header file information and then a number of blocks expressing the data. It first contains the block address where the memory will be stored, and then the block size, and then the data of the block.

    Please see:
    www.ti.com/lit/spruhm8
    http://www.ti.com/lit/sprabv4

    You can use the F2837xD_sci_flash_kernels as a guide if you choose not to use the serial_flash_programmer and kernels. They should help you in designing your custom SCI flash programmer.

    sal
  • Thank you for your answer,

    I will further inspect the documents you referred and 'sci_flash_kernels' code.

    Have a nice day.