Migration notes for Matter add-on v2.0.0

This document describes changes required or recommended for migrating your Matter application from Matter add-on v1.0.0 to v2.0.0.

Required changes

The following changes are mandatory to make your application work in the same way as in previous releases.

Build-time ZAP code generation

The Matter add-on samples no longer include pre-generated ZAP output under zap-generated/ in the sample source tree. By default, ZAP artifacts are generated automatically during the build.

The default Kconfig option is CONFIG_MATTER_ZAP_GENERATION_BUILD_TIME. No other source changes are required when you adopt this mode.

Important

On the first build of a sample, the build system downloads and installs the ZAP tool into the Matter SDK .zap-install directory. This happens automatically when CONFIG_MATTER_ZAP_CLI_INSTALL_PATH is empty and zap-cli is not already available on PATH. The download runs once for each Matter SDK revision. Later builds reuse the installed tool.

You can provide zap-cli in one of the following ways:

Build the application as usual. On the first build, the build system downloads and installs the ZAP tool automatically. No extra configuration is required.

See How to work with build configurations in the nRF Connect for VS Code extension documentation for more information.

Before building, add the Matter SDK .zap-install directory to PATH in the terminal session used by the extension, then build the application as usual.

export PATH="${ZEPHYR_BASE}/../modules/lib/matter/.zap-install:${PATH}"

Alternatively, add the same export to your shell startup file so it applies to every nRF Connect for VS Code extension terminal session.

Add CONFIG_MATTER_ZAP_CLI_INSTALL_PATH to the build configuration’s Extra CMake arguments, pointing to the directory that contains zap-cli. Rebuild the configuration after adding the argument.

See How to work with build configurations in the nRF Connect for VS Code extension documentation for more information.