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.

TM4C129XNCZAD: static library cause the overall size to be larger than the original code without static library

Part Number: TM4C129XNCZAD

Hi,

I'm using:

CCS            : Version: 9.3.0.00012

XDCTool        : xdctools_3_32_01_22_core

ARM Compiler   : ti-cgt-arm_18.12.5.LTS

TIRTOS         : tirtos_tivac_2_16_01_14

I have a code that I tried to separate part of it in a static library, but I was surprised that after doing this, the over all code increased by 8K.

after some investigations, I found that some of the functions that are implemented in the library and it wasn't invoked by the main code, the linker included it in the code. and this isn't the case where all the code was in one project.

Is there a way to let the linker ignore the unused function in the library to save the code space?

Thanks,

Mohammed