This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Identifying unused functions

I'd like to know if anyone has any hints on identifying unused functions using the C166 compiler/linker. We have a large codebase shared between multiple projects and it would be beneficial to code size if we could remove functions from certain versions that are not being used.

Parents
  • It's unfortunate that the C166 linker cannot remove unused functions from the binary image if they are from the same section (same C source file) as used ones. I believe that Keil probably put all their library functions into separate C files for this reason.
    The only solution I can come up with is using a tool like PC-Lint. Among its features is identifying unused functions.

    Regards,
    - mike

Reply
  • It's unfortunate that the C166 linker cannot remove unused functions from the binary image if they are from the same section (same C source file) as used ones. I believe that Keil probably put all their library functions into separate C files for this reason.
    The only solution I can come up with is using a tool like PC-Lint. Among its features is identifying unused functions.

    Regards,
    - mike

Children
No data