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: Automatic Section Splitting & 'Place each function in a separate subsection' option.

Part Number: TMS320F28388D


Hi, 

The linker command file in the example for TI's 28X uses 'Automatic Section Splitting' to split and arrange one section into multiple memory areas as shown below.

When using the linker command file written as in the example above, I wonder what the difference is between turning the 'Place each function in a separate subsection (--gen_func_subsections, -mo)' option on or off.

When using 'Automatic Section Splitting' to split and place sections in multiple memory regions, is it better to turn on the 'Place each function in a separate subsection (--gen_func_subsections, -mo)' option?

Thanks.

  • When using 'Automatic Section Splitting' to split and place sections in multiple memory regions, is it better to turn on the 'Place each function in a separate subsection (--gen_func_subsections, -mo)' option?

    While there is no guarantee, it is likely that turning this option on uses less memory.  There are two ways that can happen.

    One .. A split may only occur on an input section boundary.  That is how the tools guarantee a function (or array, or struct, etc.) is never split across different memory ranges.  When each function is in its own section, there are many more input sections of smaller size, and that usually tends to pack better across multiple memory ranges.

    Two ... When each function is in its own section, the linker removes the ones which are never called.  Note this occurs independent of section splitting.

    Thanks and regards,

    -George

  • Thank you for your quick reply.