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/TMS320F28379D: Some Linker Command file designations remain unused

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

Several of the linker command file designations remain unused even though program data and code elements use them (I believe).

For example,

    // C++ startup constructor tables
    .pinit      : > RAMLS0, PAGE = 0

    // Jump tables for switch statements
    .switch     : > RAMLS1, PAGE = 0

    // Initialized non-const global data
    .data       : > RAMLS2toLS3, PAGE = 0

Despite usage of C++ classes and switch statements the RAM locations above always remained unused.  

When do the .pinit, .switch, and .data get used?  In particular, is my code not benefitting from switch jump tables?  

Kindly,

Graham  

  • Graham,

    Here is a wiki page that details the linker command and how placement of memory takes place.

    http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking

     
    Regards,
    Ozino

  • Thanks Ozino,

    The .pinit and .data sections were from other documentation. Can I assume they are not used since they are not on the Wiki page?

    Also, I noticed that the .switch section specifies flash as the link location. The .switch section was specified as a non-flash RAM in my command file. Presumably that's why the switch statement tables section remained unused? It must be flash?

    If that's the case it would've been convenient for the linker to warn that the .switch section must be flash nvm.

    Kindly,
    Graham
  • Hi Graham,

    The .pinit and .data section are needed. This document goes into advance linker techniques: www.ti.com/.../spraa46a.pdf . The compiler documentation also talks more into the placment of memory into different areas: www.ti.com/.../spru513p.pdf

    I will suggest taking a look at the vast array of linker command files available in C2000Ware for the F2837xD under device_support\f2837xd\common\cmd.

    The files there provide basic memory configurations for different applications for this device.

    Depending on the application the .switch section can be assigned to flash or ram. Are you trying to run your application from flash or ram?
     
    Regards,
    Ozino