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.

CCS/Tm4c123gh6pm: Linker Problem

Part Number: TM4C123GH6PM


Tool/software: Code Composer Studio

Hello ,

I have  a problem with the CCS linker

When I write some functions lets say 10 functions , and I call only one function of these 10 function , the output file's size is very big

When I opened the map file I found that it maps all the functions that I didnot use

I found that any functions I write is added to the .OUT and .map files

How can I generate the output with only the required functions not using the unused functions.

  • muhammad moutiry said:
    How can I generate the output with only the required functions not using the unused functions.

    It depends which compiler you are using:

    a) For the TI ARM compiler in the project properties under Build -> ARM Compiler -> Advanced Options -> Runtime Model Options set "Place each function in a separate subsection (--gen_func_subsections, -ms)" option to "on".

    b) For the GCC ARM compiler in the project properties under Build -> GNU Compiler -> Optimization tick the "Place each function into its own section (--ffunctions-sections)" option.

    When the compiler has placed each function in a separate section, the linker is then able to eliminate functions (sections) which are not used.