Introduction to Device Family Packs (DFPs)

Until recently, Microchip’s MPLAB® X IDE and MPLAB XC compilers came only with inbuilt support for Microchip devices that were available at the time of their release. This meant that these tools consisted of one convenient package to download and install but it also meant that when you wanted to commence projects targeting newly released devices, you had to wait for a new IDE and a new version or part-support update of your compiler before you could proceed.

Microchip has updated its tools so that device support is now handled by Device Family Packs (DFPs). Beginning with the versions tabulated below, DFPs will be used by the tools listed to provide information for the devices used in your projects. This article discusses the advantages that these packs offer.

Tool Version
MPLAB X IDE 5.40
MPLAB XC8 2.20
MPLAB XC16 1.35
MPLAB XC32 2.20

Device Family Packs

Device Family Packs are a way of packaging and distributing device-support files. They are essentially a structured directory of files that provide information related to each device family. Some of these files are compiler-related device-specific header files, configuration bit data, and libraries; other files relate to device information displayed by the IDE and algorithms the IDE uses to program and debug the device. The files are organized in each pack so that the tools know where to find the information they need. A DFP has a version number, just like the compilers and IDE, so that they can be identified.

Before DFPs became available, device information was read from fixed, internal locations in the tool distribution. Now that DFPs are used, the IDE and XC compilers have been modified so that they can read the required files on a device-by-device basis and from arbitrary locations that can be selected when building a project. This means that the tools and their support for devices are segregated and each can be updated independently. As new versions of DFPs are made available, they can be used without having to update your current tools.

New releases of DFPs may correct known issues in the resources used by the IDE or compilers, however, they will never patch or improve the IDE or compiler applications themselves. This still takes place through the release of new versions of these products.

Introduction to Device Family Packs Video

Using DFPs from Within the IDE

During the installation of MPLAB X IDE, only those DFPs relating to device families you require need to be installed. To save disk space and speed the installation process, you might choose to install no device support at all.

packs_installed.png

When you create a project in the IDE, a DFP will be automatically selected if one is available. In the project properties dialog, you can see all the available packs and select the one you want to use.

pack_selection_in_properties.png

The currently selected pack can be seen on the dashboard.

dashboard_showing_packs.png

Once you build a project, the pack and version number that was used is displayed in the output view, after the build transcript.

output_showing_packs.png

If a pack is not available when you open or create a project, you’ll be prompted to download a relevant pack for the project's device family.

new_project_pack_prompt.png

DFPs that are individually downloaded in this way are stored separately to the IDE under .mchp_packs in your user directory, where they can be used by all IDE installations.

The IDE’s pack manager is opened from the Tools > Packs menu. From here, you can browse for DFPs by device family. It lets you see which new and updated DFPs are available, which devices they support, and what changes they implement. Links allow you to install new packs so that they can be used by the IDE and compilers.

packs_manager.png

Tool packs are also shown by this manager. These contain only firmware and are automatically downloaded by a DFP if they are needed, so you do not usually need to concern yourself with these.

When using the IDE, you can create projects for new devices, even if your version of the IDE was released before the device became available. To allow this to happen, the IDE queries an online index file to fill out the device selection widget in the IDE’s Project Properties dialog. So, provided your IDE has Internet access, it can find new devices released after your IDE was downloaded and can obtain the latest device support for those devices.

Using DFPs with a Standalone Compiler

The compilers are distributed with the relevant content from the latest DFPs so that they can be used stand-alone and without the need for any further downloads or installs. Alternate or subsequently released DFPs can also be used when you build. It is recommended that you use MPLAB X IDE to install new packs. If required, you can manually download packs from the website and store them on your host machine in the .mchp_packs directory. They are ZIP files that can be unpacked by most archiver applications although it is best to unpack and install these using the pack manager in the IDE by choosing Install from local source and selecting the .atpack file you have downloaded.

The -mdfp command-line option lets you select an alternate DFP when you build, rather than use the one shipped with the compiler. Specify the path to the compiler directory (either xc8, xc16, or xc32) inside the pack, referenced by version number and device family. Here are some examples of the option for different devices (compiler tools) and host operating systems:

-mdfp=C:\Users\Frank\.mchp_packs\Microchip\PIC24F-MC_DFP\1.2.39\xc16

-mdfp=/Users/john/.mchp_packs/Microchip/PIC16F1xxxx_DFP/1.3.117/xc8

-mdfp=/Users/Jane/.mchp_packs/Microchip/SAMD09_DFP/2.2.110/xc32
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.