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.

Compiler/TMS320F28377S: Not used function compiled and then linked!

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Hello

I'm looking for some memory space, then I seen that some fonction present is some c file, which are not used are linked and take some memory space in memory mapping.

simple example:

The file F2837xS_DefaultISR.c contain all default ISR mapped to the vector table into F2837xS_PieVect.c

As all the function are all the same, and never used because when interrupt is use, there are mapped to other function, I decide to change the default vector table.

Ex. 

CLA_UNDERFLOW_ISR -> NOTUSED_ISR

...

Then all table is a link to NOTUSED_ISR, or PIE_RESERVED_ISR.

But after compilation, in the memoryAllocation view

.text:retain (F2837xS_DefaultISR.obj)  1413 !!

And not used function (CLA_UNDERFLOW_ISR...) are present in the .map file:

000dcabc global _CANA1_ISR (.text:retain)
000dcac6 global _CANB0_ISR (.text:retain)
000dcad0 global _CANB1_ISR (.text:retain)
000dcb2a global _CLA1_1_ISR (.text:retain)
000dcb34 global _CLA1_2_ISR (.text:retain)
000dcb3e global _CLA1_3_ISR (.text:retain)
000dcb48 global _CLA1_4_ISR (.text:retain)
000dcb52 global _CLA1_5_ISR (.text:retain)
000dcb5c global _CLA1_6_ISR (.text:retain)
000dcb66 global _CLA1_7_ISR (.text:retain)
000dcb70 global _CLA1_8_ISR (.text:retain)
000dccf6 global _CLA_OVERFLOW_ISR (.text:retain)
000dcd00 global _CLA_UNDERFLOW_ISR (.text:retain)

Is there option to not link unused function and then win a lot of memory space?

I used with compiler optimization but change nothing. (Linker problem…)

Thank