5.3.5.6 How Can I Tell if a Function is Being Used?
After the project has built, view the map file for a listing of used
functions. Use the linker option --gc-sections
to ensure unused
functions are removed. For details, see the following section of this user’s guide:
For more on the linker, see the following document. It is available for download from the Microchip Technology website, www.microchip.com.
“MPLAB® XC16 Assembler, Linker, and Utilities User's Guide” (DS50002106).