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.

Compiler/TMS320C6713: Loading program sections in memory, linker script.

Part Number: TMS320C6713

Tool/software: TI C/C++ Compiler

Hi,

Let say i write a linker script to program a DSP processor say TMS320c6713. I place .text section on address 0x000 to 0x300 (flash addresses) and .data section in memory ranger from 0x600 to 0x700 (RAM address). My questions are:

a) How processor gonna execute this program, will it execute .text section from flash and load .data section in SRAM as mentioned in linker scripts.???

b) if it load full program in SRAM, what about the gap b/w .text section and .data section, i.e the gap between 0x300 to 0x600. will the this gap be left blank in RAM as not mentioned in linker script, if so isn't it sort of  fragmentation problem??

c) what about the output object file, how these non contiguous sections be placed inside object file???

  • In TI documentation, what you term a "linker script" is called a "linker command file".  Neither term is better than the other.  They are simply different phrases for the same thing.

    aimal khan said:
    How processor gonna execute this program

    That depends on the details of what occurs when power is turned on.  It is typical for the system to start by vectoring to a particular interrupt (often called the reset vector).  It is your responsibility to attend to such details.  This includes getting the system to execute the startup code.  

    aimal khan said:
    if it load full program in SRAM, what about the gap b/w .text section and .data section

    Provided your code doesn't have some fault that causes execution to somehow run away, those memory locations go untouched.  

    aimal khan said:
    isn't it sort of  fragmentation problem??

    Not one that occurs in practice.  In practice, the MEMORY directive in the linker command file contains an accurate map of system memory.  Thus the holes that do occur tend to be small, or due to a program that is much smaller than available memory.

    aimal khan said:
    what about the output object file, how these non contiguous sections be placed inside object file???

    The location of the raw data of a section within an object file is determined by the object file format.  I recommend you perform an internet search on the terms in italics.

    Here are some wiki articles that are likely to be useful.

    Thanks and regards,

    -George