Saving/Importing Individual Peripheral MPLAB® Code Configurator (MCC) Configurations

Last modified by Microchip on 2024/01/22 16:48

When using MPLAB® Code Configurator (MCC) to generate the peripheral setup for a project, the final MCC setup can be saved as a project configuration file that contains all the settings selected by the MCC tool. This file is automatically added to a project when MCC generates the drivers. That file can be saved as a .mc3 file and imported into a new project.

With MCC version 4.35 and later, you can now save individual peripheral MCC configurations rather than the whole project setup. For example, the USART and Timer 1 peripheral MCC configurations can be saved as an individual file and then imported into a new project so these peripheral configurations can be used over and over again in the same way.

Saving the Peripheral Configuration File

From an active MCC project, right-click on any module(s) in the Project Resources window to mark for the export process.

project resources tab

Once one or more modules have been marked for export, you can click on the Export button and save the configuration as an MCC configuration file .mc3. The default file name is based on the names of the exported modules.

Save file dialog

Importing Peripheral Configuration Files Into a New Project

From an active MCC project click the Import.. button in the Project Resources window and select the MCC peripheral configuration file (.mc3) to be imported into the current project. Note that the current project will be updated with all the module configurations that exist in the imported configuration file. This means the import process is going to overwrite an existing module configuration if it is already configured in the current project.

Select MCC Configuration File dialog

  • MCC must be installed within MPLAB X IDE to use the .mc3 configuration project.
  • The .mc3 file must be set up for the same device in the new project.

The import process may fail if the imported configuration was created on a different device or with a different library version compared to the current library. If this occurs, the project will be reverted back to the state before the Import.. button was clicked.

configuration migration process confirmation dialog