4.6.1.7 Dfp Option
-mdfp=path
option indicates that
device-support for the target device (indicated by the -mcpu
option) should be obtained from
the contents of the specified Device Family Pack (DFP), where
path
is the relevant path to the xc8
directory within the DFP. For example, if the required DFP has been dowloaded
and installed in the Microchip subdirectory, a build command
utilizing that DFP might look
like:xc8-cc
-mcpu=16F1946
-mdfp="Microchip/PIC12-16F1xxx_DFP/1.7.242/xc8"
main.c
The Microchip development environments automatically use this option to inform the compiler of which device-specific information to use.
If you are building on the command line or via a makefile, download the required DFP from
packs.download.microchip.com.
The .atpack file can be unarchived by many archive applications,
but it is recommended that you use the Pack manager in the MPLAB X IDE. From within the
IDE, open the Pack manager from the menu, then from the Install or Uninstall drop
down, select Install Pack From Local Source. Specify the path to
where you save the DFP in the -mdfp
option when you build your
project.
A DFP might contain such items as device-specific header files, configuration bit data and libraries, letting you take advantage of features on new devices without you having to otherwise update the compiler. DFPs never contain executables or provide bug fixes or improvements to any existing tools or standard library functions.
When using this option, the preprocessor will search for include files in the DFP/xc8/pic/include/proc
and DFP/xc8/pic/include
directories first (where DFP
represents the path to the DFP) then search the standard search directories.