Getting Started with MCUXpresso for VS Code: Matter on Windows (24.12.71)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting Started with MCUXpresso for VS Code: Matter on Windows (24.12.71)

Getting Started with MCUXpresso for VS Code: Matter on Windows (24.12.71)

Matter support in Visual Studio Code (VS Code) is now open to all developers.

MCUXpresso extension for VS Code v24.12.71 integrates the Matter toolchain for development on Windows, macOS and Linux. 

It can be installed by visiting Microsoft’s Marketplace for VS Code.

max_palumbo_0-1712585283362.png
The following steps will set up your Windows system to develop Matter on NXP devices.
This Getting Started process takes ~1 hour.  This is similar time it takes with flawless CLI setup.
  • Import Matter repo takes ~30 minutes (Clone Matter repo; run bootstrap setup script) 
  • Import first project for a board takes @~10 minutes (SDK repo download - 1st time every board)
Additional projects can then be quickly imported/built.

1. Install Pigweed Project Automation Tool

Pigweed is used for easier automation of building, testing, and linting GN and CMake projects.  Matter uses GN, so Pigweed is used by the maintainers of the project.  Complete the following to allow the Matter Bootstrap to properly modify/install the repository.

Launch a Terminal in Administrator mode to allow operations to complete successfully.

  • Ensure that Developer Mode is enabled. This can also be done by running the following command as an administrator:
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock /t REG_DWORD /v AllowDevelopmentWithoutDevLicense /d 1 /f\""
  • Enable long file paths. This can be done using regedit or by running the following command as an administrator:
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
  •  Enable Git symlinks:
git config --global core.symlinks true

For more information on these settings visit Get started with Pigweed - Pigweed 

2. Install Visual Studio Code (VS Code)

Microsoft allows users to quickly install VS Code from https://code.visualstudio.com/download. The link allows the user to select the appropriate download for their OS. 

The following instructions are for a Windows installation.  However, most of the following steps also apply to Mac and Linux users.

It can be helpful for new users to directly install VS Code and the NXP extension.  This can be done by sharing one of two links: 

If VS Code exists on the system, the user will be taken to the NXP MCUXpresso for VS Code extension in the Microsoft Marketplace.  If VS Code is NOT installed on the system the user will be guided through the install of VS Code. 

At this point the VS Code application should be installed on the laptop.

3. Install MCUXpresso for VS Code Extension

The user can install or update the MCUXpresso for VS Code extension from within VS Code.  The following steps outline how.  A short clip is included to show the steps.

  1. Open VS Code.  Launch program from desktop.
  2. Open the Extensions Marketplace.  Click on Icon of 4 blocks in left navigation VSCode-Extension-Icon.png or use Ctrl-Shft-X.
  3. Search "NXP" or "Mcuxpresso" in the Extension search window at the top left.
  4. MCUXpresso for VS Code extension will be displayed.  Click on listing.
  5. Click on blue Install button in the Extension Overview that is opened in the editor.
  6. The Extension is properly installed when the following NXP icon is shown in left navigation. VSCode-NXPExtension-Icon.png

Matter-VSCode-June-InstallExtension.gif

At this point the VS Code application now includes the NXP MCUXpresso extension.

4. Run MCUXpresso Installer for Tool Dependencies

It is now necessary to install other tool dependencies to properly use VS Code for MCUXpresso, Zephyr and/or Matter.

NXP provides the MCUXpresso Installer utility to simplify properly meeting these tool dependencies.  The following steps list how to use the installer for a Matter system.  A short clip is included to show the steps.

  1. Click on "Open MCUXpresso Installer" found under Quickstart Panel in upper left.
  2. The MCUXpresso Installer will launch if already installed.  NOTE: If the Installer is not found, the user should select the blue "Download" button in the bottom right notification.
  3. Select the following from the MCUXpresso Installer list of available tools:
    1. Matter Developer
    2. Arm GNU Toolchain
    3. Standalone Toolchain Add-ons
    4. LinkServer
  4. Click the blue "Install" button and wait until installation progress shows complete
  5. Restart VS Code so that new settings are active

Matter-VSCode-June-MCUXpressoInstaller-v3.gif

At this point the VS Code application now includes the NXP MCUXpresso extension, and the laptop has any other tools required to begin Matter installation.

5. Import NXP Matter Repository

The MCUXpresso for VS Code extension simplifies how the user can add Matter to their workspace.  The repository import wizard automates most of the steps required for a user to get started with Matter.
The following steps show how to add Matter Repository.  2 short clips are included to show the steps.
  1. Click on "Import Repository" found under Quickstart Panel in upper left.
  2. Click Repository found in the wizard's Remote tab.
  3. Select "NXP Matter".  This automatically targets the NXP/Matter repo found on GitHub.
  4. Enter a desired location to clone/store the NXP Matter repository.  Closer to C:/ is better.
  5. Select "release/v1.4.0" listed as an available version under Revision:
  6. Click Import

The import process can take ~30 minutes depending on network bandwidth and IT software.

NOTE: This is similar amount of time when using CLI in a terminal.  

Matter-VSCode-June-Process-Clone-Repo-v2.gif
After the repo is cloned, the Matter Bootstrap script is used to setup matter environment.
Matter-VSCode-June-Process-Clone-Bootstrap-v4.gif
At this point the user laptop has a valid Matter workspace.  The workspace is now capable of importing and building Matter projects.

6. Import First Matter Project

The MCUXpresso for VS Code extension includes an Import Example wizard that simplifies adding Matter projects to a workspace. 

The following instructions show how to import a project from the NXP Matter repository.   A short clip is included to show the steps.

  1. Click "Import Example from Repository" from the Quickstart Panel in the upper left.
  2. Select the Matter Repository from the drop-down options for Repository.
  3. Select the desired Toolchain from the drop-down options for Toolchain.  A GNU Toolchain should be available from previous MCUXpresso Installer steps.
  4. Select the target board from the drop-down options for Board.  The listed boards are supported in the NXP Matter repo.
  5. Select the desired project from the Template drop-down options.  Currently there are "contact-sensor-app" and "lighting-app".
  6. Click Create blue button.

Matter-VSCode-June-Process-ImportProject-v2.gif

At this point there is a Matter project in the workspace.  The project can be explored with the provided project properties and file explorer views.

7. Build Matter Project

Building the project is the final step for Getting Started with a Matter project in VS Code.  The extension has properly setup the project toolchain and will build successfully.  The NXP extension reduces the setup time by not importing the SDK for all supported boards.  The board SDK is automatically imported/cloned when it is not located on the 1st build for a board.  Successive projects for the same board will not require this additional step/delay.

The following steps show how to build a matter project in the workspace.  A short clip is included to show the steps. 

  1. Select the Matter project listed under the Projects pane located in the primary left sidebar.  When selected, project control icons are revealed to the left of the project name.
  2. Click on the Build icon.  
  3. Verify the build was successful by viewing the binary files with File Explorer.  Click the File Explorer icon to the right of project name or in the upper left of the side bar navigation.  The binary is found under the project's \out\debug folder.

Matter-VSCode-June-Process-BuildProject-v2.gif

This exercise on "Getting Started with Matter" is completed.  At this point the Matter project imported to the workspace was successfully built. 

Labels (1)
No ratings
Version history
Last update:
‎02-12-2025 01:46 PM
Updated by:
OSZAR »