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.
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
"I'd like to know if anyone has any hints on identifying unused functions using the C166 compiler/linker." Not using the compiler/linker, but use the Code Browser in uVision, and sort by the number of "references" If the number of "references" is only one - then that's just a definition with no uses. (If the number of "references" is two, that could mean that it's defined, declared in a header, and then not further referenced). Job done - that'll be fifty quid, please.