I want to retain a function but eliminate all other unused function from my code. I am using CCS code gen tools version 4.4.2.
I have tried the following options
- #pragma RETAIN(func_name); Compiler throws an error indicating unrecognized pragma
- #pragma FUNC_EXT_CALLED(func_name); With this also, function is removed.
- --retain=func_name in the linker command file. This does not work with TI COFF output. I had to change compilation to EABI format and even after that the function was removed.
How to force linker to keep a function even if it is not used?
Thanks,
Sumeer