Silicon Labs Matter Solution Guide

Introduction

The Silabs Matter Solution Guide explains how to use the Silabs Matter offering. It explains how to set up the development environment, build and flash a Silabs sample app.

Silabs logo

NOTE: Silicon Laboratories now maintains a public Matter GitHub repo with frequent releases thoroughly tested and validated. Developers looking to develop matter products with silabs hardware are encouraged to use our latest release with added tools and documentation. Silabs Matter Github

Developers can find more resources on the Silicon Labs Matter Community Page.

Requirements

Hardware Requirements

For the list of hardware requirements, see the official Silicon Labs Matter HW requirements documentation.

Software Requirements

For the list of software requirements, see the official Silicon Labs Matter Software requirements documentation.

Software Artifacts

For pre-built binaries for the latest Silicon Labs Matter release, see the official Silicon Labs Matter Software Artifacts. This includes all necessary binaries to run a Silicon Labs sample app.

Building

Silicon Labs currently supports the following list of sample apps in the main Matter SDK. Every sample has its own documentation explaining its unique features and functionalities. The examples in the CSA Matter Repository column are supported in the main Matter SDK. Additionally, the Silabs Matter Repository offers extra sample applications for different device-types

Build Script

To build a Silicon Labs sample apps, we provide the gn_silabs_examples.sh scripts that can be found in the ./scripts/examples directory. The build script can be used to build all of the Silabs supported examples. The command structure is as follows when called from the root of the repository:

./scripts/examples/gn_silabs_example.sh <path_to_sample_app> <output_directory> <board> <args>

To build the lighting app as an OpenThread SoC, the default build command for the BRD4187C DK is

./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/ ./out/lighting-app BRD4187C

To build the lighting app as an Wi-Fi MG24 + RS9116 NCP, the default build command for the BRD4187C is

./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/lighting-app_rs9116 BRD4187C use_external_flash=false chip_enable_ble_rs911x=true --wifi rs9116

Note: The build argument --wifi rs9116 is necessary to build the BRD4187C image with the necessary code for the NCP combo. chip_enable_ble_rs911x=true enables the RS9116 NCP bluetooth. The MG24 + RS9116 NCP combo does not yet support external flash.

To build the lighting app as an Wi-Fi MG24 + SiWx917 NCP, the default build command for the BRD4187C is

./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/lighting-app_siwx917 BRD4187C use_external_flash=false chip_enable_ble_rs911x=true --wifi SiWx917

Note: The build argument --wifi SiWx917 is necessary to build BRD4187C image with the necessary code for the NCP combo. chip_enable_ble_rs911x=true enables the RS9116 NCP bluetooth. The MG24 + SiWx917 NCP combo does not yet support external flash.

To build the lighting app as an Wi-Fi MG24 + wf200 NCP, the default build command for the BRD4187C is

$ ./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/lighting-app_wf200 BRD4187C --wifi wf200

Note: The build argument --wifi wf200 is necessary to build the BRD4187C image with the necessary code for the NCP combo.

Build Arguments

The ``gn_silabs_examples.sh` script takes two types of build arguments. The first type are macros processed within the script itself and the second are GN arguments. The Macros encapsulate multiple GN arguments to simplify enabling or disabled specific features.

Note: Executing the build script without any arguments will print a helper with the command structure, the list of supported boards, and a list of supported macros and arguments

./scripts/examples/gn_silabs_examples.sh

Here is a list of some the supported macros and their GN argument equivalent.

Macro NameDescriptionGN equivalent
--wifiConfigures an sample app as a Wi-Fi devices.
This macro requires rs9116 or SiWx917 or wf200.
--wifi rs9116 : use_rs9116=true
--wifi SiWx917 : use_SiWx917=true
--wifi wf200 : use_wf200=true
--icdConfigures the device as an ICDchip_enable_icd_server=true chip_openthread_ftd=false
--low-powerConfigures the most power efficient build.
This is used in tandem with the --icd macro
chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true
--chip_enable_wifi_ipv4Enables IPv4 support on Wi-fi configured buildschip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true
--cleanCleans the output directory before buildingNA
--additional_data_advertisingEnable additional data advertising and rotating device IDchip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true
--use_ot_libBuilds the sample app with the Silabs certified OpenThread librariesuse_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=""""
--use_ot_coap_libBuilds the sample app with the Silabs certified OpenThread COAP librariesuse_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform="""" use_thread_coap_lib=true
--releaseRemove all logs and debugs features (including the LCD).
Yields the smallest image size possible
is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false
--bootloaderAdds a bootloader to the built imageNA
--uart_logForwards logs to uart instead of RTTsl_uart_log_output=true

Here is a list of some of the GN arguments that can be added to the build command.

Note: All GN arguments can be added to the build. gn args --list <output_directory> can be used to list all GN arguments.

GN argumentDescriptionDefault Value
chip_build_libshellEnables the Matter Shellfalse
chip_openthread_ftdDefines if the OpenThread device is an FTD (true) or an MTD (false)true
efr32_sdk_rootLocation for an alternate Gecko SDK./third_party/silabs/gecko_sdk
enable_heap_monitoringMonitor & log memory usage at runtimefalse
enable_openthread_cliEnables the OpenThread clitrue
kvs_max_entriesSet the maximum KVS entries that can be stored in NVM
Thresholds: 30 <= kvs_max_entries <= 255
255
chip_enable_icd_serverConfigure device as an intermittently connected device
For Thread builds, chip_openthread_ftd must also be set to false.
false
disable_lcdDisable the LCD on devices with an LCDfalse
show_qr_codeEnables QR code on LCD for devices with an LCDtrue

On top of the GN arguments specified here, each sample app will specify, if need be, the GN arguments specific to it.

Flashing

The Matter SDK provides a standard way of flashing a sample app binary onto hardware. After completing a build, a python script is generated that can be used to flash the binary. The naming structure of the file is

matter-silabs-<sample_name>-example.flash.py

For example, the lighting-app flasher script will be named

matter-silabs-lighting-example.flash.py

To execute the script, the following command can be used:

python3 <path>/matter-silabs-lighting-example.flash.py

where <path> is the path to the output directory used in the build script.

Note: It is also possible to flash the built binary with commander directly. The commander command is commander flash <path>/matter-silabs-lighting-example.<s37/rps>
The .s37 binaries are used with the MGM24 and EFR32 families while the .rps binaries are only used for the SiWx917 SoC family.

Flasher Arguments

The flashing script provides configuration arguments and operation arguments. The configuration arguments are used to configure the operation arguments.

Here is a list of the configuration arguments that can be added to the flasher script.

ArgumentDescription
--verbose, -vReport more verbosely
--commander FILEPath to the commander executable
--device, -d DEVICEDevice family or platform to target (EFR32, MGM24, 917)
--serialno, -s SERIALSerial number of device to flash.
This argument is necessary when multiple boards of the same family are connected.
--ip, -a ADDRESSIP Address of the device to flash

Here is a list of the operations arguments that can be added to the flasher script.

ArgumentDescriptionCommander equivalent
--eraseErase the devices flash.
This options completely wipes the devices flash including factory data.
commander device masserase
--application FILESpecify which binary to flash.
The flasher script provides a default path to the binary that was just built.
commander flash
--resetReset device after flashingcommander device reset
--skip-resetDo not reset device after flashingcommander flash --noreset
--verify-applicationVerify the image after flashingcommander verify

Executing the flasher scripts with the --help / -h arguments will print a help menu with all the possible arguments.

Note: For a wider range of features, the commander tool can be used directly. Running commander --help / -h will list all the available options of the tool.

Standard Application Behavior

See the Standard Application documentation for behaviors that are common to all sample apps.

Silabs CLI

See the Silabs CLI documentation for more information on the provided cli commands.