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.
Hello,
Does anyone know how to set the compiler in ccs4 to include from a header/source file only the functions used, rather than everything? For instance, a certain peripheral .h/.c file contains a bunch of math functions that I don't use, so I don't want to have them in the .out file.
edit: I'm compiling for a c28x mcu.
Thanks,
Trey
I presume you do not mean declarations (i.e. the function prototypes) from header files. Those can never lead to unused code.
On the C6000 compiler, if you build with the option --gen_func_subsections (-mo), then each function is placed in a subsection separate from all other sections. This means the linker can, upon seeing there are no calls to this function, remove it. Most TI compilers have this option, though the option spelling may be different. Check your manual.
Thanks and regards,
-George