Getting Started with MPLAB® Code Configurator (MCC) for MPLAB Extensions in VS Code®

Last modified by Microchip on 2025/08/11 10:44

MPLAB Extensions logo

MPLAB® Code Configurator (MCC) for MPLAB Extensions is an extension for VS Code® that provides an interface to develop project code for device peripherals and functions. The extension is similar to the MCC plug-in for MPLAB X IDE. Some MCC extension features of note are:

  • As with the MCC plug-in, creating or importing an MPLAB project and then opening the MCC extension (MPLAB MCC: Launch) will associate the MCC configuration with that project. For an imported project with content from the MCC plug-in, the extension will attempt to open the project with existing MCC information.
  • An MCC configuration can be created without being associated with a project. Once created, an MCC configuration can then be associated with a project (default configuration) or a specific project configuration for projects that have more than one.

    Launch the MCC extension and select Create New MCC Config > Create New Standalone MCC Config.

    To associate this configuration with a project, use MPLAB MCC: Configure Associated Project.

The table below documents the important workflow differences between how this extension works and how the MCC plug-in works with MPLAB X IDE.

Action or Term MPLAB X IDE VS Code VS Code Notes
Installation 

On the MPLAB X IDE menu:

  1. Go to Tools > Plugins > Available Plugins
  2. Find MPLAB Code Configurator and click Install.
From the VS Code Marketplace, install the latest MPLAB Extension pack. The MCC extension is included. 
Documentation Go to the "MPLAB Code Configurator" webpage or "Online Technical Documentation" .

Click on the installed extension to view the extension overview page with video link:

 

 

Device support 

To find support:

  1. Go to the "MPLAB Code Configurator" webpage.
  2. Under the "MCC Content Types" section, determine what type applies to the project device you want to use and click on the link.

To find support:

  1. Go to the "MPLAB Code Configurator" webpage.
  2. Under the "MCC Content Types" section (1), determine what type applies to the project device you want to use and click on the link.
(1) MCC Classic is not supported in the extension.
Open MPLAB project 

Options are:

  • Create a new MPLAB X IDE Project (File > New Project).
  • Open an existing project (File > Open Project).
  • Import a project from MPLAB Discover.

The project will open in MPLAB X IDE after selecting an option.

Options are:

  • Create or import an MPLAB project using the walkthrough. In the command palette (1), enter "MPLAB: Welcome".
  • Open an existing workspace with a project.

The project will open in VS Code after selecting an option.

(1) To open the command palette, use Ctrl + Shift + P or from the Search bar enter the greater-than symbol (>).
Launch MCCClick on the MCC icon MPLAB X IDE MCC Open in the toolbar. In the command palette, enter "MPLAB MCC: Launch". VS Code MCC Open  
Create MCC configuration There are no separate MCC configuration files. All built MCC files are placed into the project. Select Create New MCC Config (1) for projects (default config) without any existing configuration files (2). If your project has MCC files (e.g., from an imported project), the extension will attempt to open with this existing information.

(1) When the workflow to create a new MCC config is complete, the configuration will fail to load and you will see the notification: MCC shut down due to VS Code restarting extensions.
Relaunch MCC to see the new MCC config files and then the MCC UI will open. This only happens the first time a new MCC config is created.

(2) If there is more than one project configuration, you can create another MCC config for that project configuration.

Associate with project The MCC UI is already associated with a project on opening. 

Choose either:

Path 1: Select a project you want associated with the MCC configuration.

  • Make sure the project is open in VS Code
  • Make sure that MCC Config and the project you want to associate use the same device

Path 2: Select Create a New Standalone MCC Config to create the configuration now and associate it with a project later (1). The MCC config will open in VS Code.

(1) After the configuration is created, in the command palette, enter "MPLAB MCC:Configure Associated Project".

 

Path 1

Configure MCC configuration 

MCC configuration files are always associated with the project. Either follow the default flow or customize with Other Options 

Path 1

Open MCC 

The MCC UI will open in a tab. For details on using the interface, see Documentation in row 2.

When you have completed MCC setup, click the Generate button to create the code.

The MCC UI will open in a tab. For details on using the interface, see Documentation (1) in row 2.

When you have completed MCC setup, click the Generate button to create the code. 

(1) Includes video links which show examples of using the MCC UI and generating code.

Path 1

MCC-generated files in an associated project 

MCC-generated files are integrated into the associated project’s folders. Some files, such as main, may also be edited.
MPLAB X IDE MCC files
MCC-generated files are placed in their own folder under the associated project's main folder. The project’s .json file (under .vscode) is edited to include the location of the MCC folder and files for the project build (1).
VS Code MCC files
(1) Go to the end of this table for how to build a project.

Path 2

Configure MCC configuration 

 N/A In the command palette, enter "MPLAB MCC: Launch". Select MCC Config to open the MCC UI.  

Path 2

Open MCC

N/A 

The MCC UI will open in a tab. For details on using the interface, see Documentation (1) in row 2.

Warning

When you have completed MCC setup, do not click the Generate button yet.

(1) Includes video links which show examples of using the MCC UI and generating code.

Path 2

Associate project with standalone MCC config 

N/A 

To associate the generated files with a project, in the command palette, enter "MPLAB MCC:Configure Associated Project". 

  • Make sure the project is open in VS Code
  • Make sure that MCC Config and the project you want to associate use the same device
 

Path 2

MCC-generated files for standalone MCC config 

N/A 

In the MCC UI, click the Generate button to create the code. 

The project’s .json file (under .vscode) is edited to include the location of the MCC Config folder and files for the project build.

Under MCC Config, in the mcc>mcc.vscode file, the associated project is referenced.
VS Code MCC Config Standalone

 
Build project In the Projects tab, right-click on the project name and select Build or Clean and BuildIn the command palette, enter "MPLAB CMake: Build" or "MPLAB CMake: Clean Build".  

See also "Get Started for MPLAB® X IDE Users New to Visual Studio Code (VS Code®)".

For more examples of MCC config workflows, see the videos linked on "Getting started with MCC in MPLAB".

Back to Top