Installation Guide for Matter with MCUX SDK

This guide explains how to install the necessary tools and set up your development environment to work with Matter in the MCUX SDK.

Install Software Tools

To begin working with Matter in MCUX SDK, you will need to install a set of software dependencies.

We recommend following the Installation guide of MCUX SDK to install the required tools.

Note : The tools required for Matter are the following : Git, Python, West, CMake, Kconfig, Ninja, ARM GCC Toolchain. If you’re setting up the environment solely for Matter, you can skip installing other tools mentioned in the SDK guide.

We recommend to install the tools in a dedicated folder and add them to your system PATH to ensure easy access and management.

Additionally, Matter requires the GN tool. The recommended version to install is the 2239 :

Ensure GN is also exported in your system PATH after downloading the appropriate binary for your operating system.

Install the following python package :

$ pip install pyyaml

Alternative : MCUXpresso for VS Code

For a streamlined development experience, you can use the MCUXpresso for VSCode Extension which automates much of the setup process described in this guide. Full details are available in MCUXpresso For VSCode - Working with Matter.

Install MCUX SDK with Matter support

Initializing a new workspace with MCUX SDK supporting Matter

Follow this section to setup a new environment from scratch that supports Matter in the MCUX SDK.

If you’re using Windows, ensure the symbolic links are handled correctly by following these steps:

Important Note : Ensure the Developer Mode is enabled in Windows Settings. To enable it, go to Settings > System > For Developers and enable “Developer Mode”. Windows Developer Mode Settings

# Enable symbolic links globally in Git configuration
> git config --global core.symlinks true

# Verify the setting, this should return true if configured correctly
> git config --global --get core.symlinks  

Note: You may need to restart your command prompt or terminal after enabling Developer Mode for the changes to take effect.

The repository mcuxsdk-manifests-connectivity-addons provides Matter support integrated as middleware in the MCUX SDK. Matter will be cloned under “mcuxsdk/middleware/matter”.

To initialize the SDK you can follow these steps :

# 1. Initialize the SDK repository
$ west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests-connectivity-addons.git sdk-next --mr v1.4.2.0

# 2. Navigate into the SDK directory
$ cd sdk-next

# 3. Update all remaining modules
$ west update

# 4. Enable West command extensions
$ west config commands.allow_extensions true

# 5. Export SDK to create the mcuxsdk cmake package (only required once)
$ west mcuxsdk-export

To clone only the minimal set of SDK components required for Matter, use the custom West manifest file west_matter_minimal.yml provided in the mcuxsdk-manifests-connectivity-addons repository. This can be achieved by replacing the step #1 in the setup instructions above with the following:

# 1. Initialize the SDK repository
$ west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests-connectivity-addons.git sdk-next --mf west_matter_minimal.yml --mr v1.4.2.0

Existing MCUX SDK workspace

If you already have MCUX SDK initialized locally and prefer not to re-clone the entire SDK again to get Matter, you can integrate Matter manually by following these steps. This allows you to add Matter support to your existing workspace without starting from scratch.

# 1. Navigate to your existing SDK workspace (location of ".west")
$ cd /path/to/sdk-next

# 2. Remove the SDK ".west"
$ rm -rf .west

# 3. Re-initialize the west workspace using the "mcuxsdk-manifests-connecitivity" repo
$ west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests-connectivity-addons --mr v1.4.2.0 .

# 4. update all west modules (Matter and matter_examples included)
$ west update

Note : The step 4 will update all your SDK components to the revision referenced by “mcuxsdk-manifests-connectivity-addons” manifest file.

Setup Matter Environment

We provide a lightweight bootstrap script to install minimal python dependencies to set up the Matter environment for NXP MCU platforms.

For Unix-like systems (Linux/MacOS) :

user@ubuntu:~/sdk-next/mcuxsdk$ source middleware/matter/third_party/nxp/nxp_matter_support/scripts/bootstrap.sh

For Windows systems :

C:\sdk-next\mcuxsdk> .\middleware\matter\third_party\nxp\nxp_matter_support\scripts\bootstrap.bat

Note : Make sure to use the command prompt (cmd.exe) when running the bootstrap script.