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.

TMS320F28388D: linker cannot locate data structure in section

Part Number: TMS320F28388D

Hello All,

We have a very strange situation that the linker cannot link a structure of 0x98 in size into an output section section that is 0x98.

The linker output looks like this: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section.placement with alignment.blocking fails for section xxx size 0x98page0. Available memory ranges MEM_xxx size 0x98 unused: 0x98 max hole: 0x98

the memory where we plan to locate the section is defined like this:

#define LEN_xxx 0x98

MEM_xxx : origin = 0x0C0000 - LEN_xxx, length = LEN_xxx

Some important facts:

if instead the data structure with size 0x98 we use an array with size 0x98 the linking works fine

if we use 0xA0 and 0xB0 for LEN_xxx and the data structure as input sectiuon the linking does not work

if we use 0xC0 for LEN_xxx and the data structure as input section the linking works ok. After linking complete, when we inspect the map file we can clearly observe that the size of the structure is, as expected, 0x98.

a fuew questions arrize:

1 - why does linking work for an array but not for a data structure of the same size

2 - why does linking work for an arbitrarly higher section size (0xC0) and not for 0xA0 or 0xB0 when the located data is, in this case, 0x98.

If any of you has an idea of why the locating does not work in the first place, please let me know.

We are using the compiler that comes with the code composer studio 10.2

Thank you,

Eugen

  • We have a very strange situation that the linker cannot link a structure of 0x98 in size into an output section section that is 0x98.

    I presume this data structure is defined in one C file.  For that C file, please follow the directions in the article How to Submit a Compiler Test Case.  While I am not certain, I am confident I can use that to reproduce the problem.

    Thanks and regards,

    -George

  • Test_logistics.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*=========================================================================*/
    /*
    Compiler-Version:
    --------------
    TMS320C2000 C/C++ Compiler v20.2.2.LTS
    Build Number 1UGHK-2LI-RZASS-TAQ-C08D
    TMS320C2000 C/C++ Parser v20.2.2.LTS
    Build Number 1UGHJ-2LI-RZASS-TAQ-C08D
    TMS320C2000 EABI C/C++ Parser v20.2.2.LTS
    Build Number 1UGHJ-2LI-RZASS-TAQ-C08D
    TMS320C2000 C/C++ File Merge v20.2.2.LTS
    Build Number 1UGHK-2LI-RZASS-TAQ-C08D
    TMS320C2000 C/C++ Optimizer v20.2.2.LTS
    Build Number 1UGHJ-2LI-RZASS-TAQ-C08D
    TMS320C2000 G3 C/C++ Codegen v20.2.2.LTS
    Build Number 1UGHK-2LI-RZASS-TAQ-C08D
    TMS320C2000 Assembler v20.2.2.LTS
    Build Number 1UGHK-2LI-RZASS-TAQ-C08D
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Hi George,

    thank you very much for your input. Please find attached to this message the extract file. It has all the needed data inside.

    Please let me know if you have updates about this topic since it is a blocker for our project.

    Thank you,

    Eugen

  • Thank you for the test case.  Unfortunately, I am unable to reproduce the problem.  Please submit the linker command file.  So the forum will accept it, please add the file extension .txt to it.  Also, by copying and pasting the text of the command, show exactly how the linker is invoked.  That additional detail may allow me to reproduce the problem.

    Thanks and regards,

    -George