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.

TMS320F280049C: Is there a way to prevent linkage of unused functions ?

Part Number: TMS320F280049C


Hello,

I'm using CCS 10.1.1.00004 with a project set to generate EABI output format.

I would like to prevent unused function to occupy space in my output file.

I see in the manual the option

--unused_section_elimination[=off|on] Eliminates sections that are not needed in the executable module. Default is on. (EABI
only)

that should be ON in my project, but I see that the .map contains unused functions.

I tried also to add manually the string "--unused_section_elimination=on" to the linker command window but it seems it is not recognized (see image)

Is there any way to achieve the target ?

Especially for the TI driver files (that are fully added to my project), it is difficult to me to exclude unused functions at compile time.

best regards

  • David,

    Please try this and see if that helps:

    Right click on the project in CCS and select Show Build Settings --> expand Build --> Expand C2000 Compiler --> Expand Advanced Options --> Runtime Model Options -> Turn on "Place each function in a separate subsection".

    Compile with this option and check if it removed the unused functions.

    If it does not help, we can loop our compiler team to help you.

    Thanks and regards,
    Vamsi