Heads up! New Developer Preview programs are rolling out soon. Apply here and be one of the first to try new tools and provide feedback.

Silicon Labs

EFR32MG24

This example functions as a light bulb device type, with on/off capabilities. The steps were verified on SiLabs EFR32MG24 development board.

This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005.

Initial setup

  1. Install dependencies as specified in the connectedhomeip repository:
    1. Building Matter
    2. Building the EFR32 Lighting Example
  2. Install Simplicity Commander and make sure its binary (commander) is in your PATH. For example:
    export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
  3. Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
  4. Clone and initialize the connectedhomeip repo:
    cd ~
    git clone https://github.com/project-chip/connectedhomeip.git
    cd connectedhomeip
    git fetch origin v1.0-branch
    git checkout FETCH_HEAD
    git submodule update --init --recursive
    source ./scripts/activate.sh
  5. Export environment variables:
    1. If your board is the 10 dBm version, use BRD4186C:
      export EFR32_BOARD=BRD4186C
    2. If your board is the 20 dBm version, use BRD4187C:
      export EFR32_BOARD=BRD4187C

Build the image and flash the board

  1. Build the image for the lighting app:
    cd examples/lighting-app/efr32
    source third_party/connectedhomeip/scripts/activate.sh
    gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
    ninja -C out/debug
    The image will be generated in out/debug folder.
  2. Connect the EFR32 board with your computer and flash the image to your EFR32 board:
    python3 out/debug/chip-efr32-lighting-example.flash.py --erase

Install bootloader

  1. Open Simplicity Commander:
    commander
  2. Open the "Select Kit..." dropdown in the upper-left corner and select the kit to be flashed with a bootloader. This menu is populated with all the JLink devices detected and lists them by serial number. For ease of selection, unplug all JLink capable devices except the device to be flashed so that the list is only populated with one kit.
  3. Select the Flash tile on the left side.
  4. In the Flash MCU section, click Browse.
  5. Navigate to connectedhomeip/third_party/silabs/matter_support/matter/efr32/bootloader_binaries and find the .s37 file that matches the EFR32_BOARD environment variable you set:

    1. If your board is the 10 dBm version and you used BRD4186C, select bootloader-storage-spiflash-single-1024k-BRD4186C-gsdk4.1.s37.
    2. If your board is the 20 dBm version and you used BRD4187C, select bootloader-storage-spiflash-single-1024k-BRD4187C-gsdk4.1.s37.

    Click Open to select the file.

  6. Click Flash.

Note that after flashing the bootloader, subsequent flashing of the application should omit the --erase flag, otherwise the bootloader will have to be re-flashed. The --erase flag erases all of the board's flash, including the bootloader.

Validate the example

  1. Check logs from your board. Open two terminal windows.
    1. In the first window:
      JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
    2. In the second window:
      JLinkRTTClient
      The logs will be printed out in the second window.
  2. The device should present itself as a USB serial device on your computer. You may look it up in /dev/:
    ls -la /dev/tty*
    You can open the serial console with minicom or screen. For example, if the device is at /dev/ttyACM0:
    screen /dev/ttyACM0 115200
    The serial console allows you to enter OpenThread commands (for example, state).
  3. If the EFR32 board has been paired before, it's recommended that you factory reset it:
    1. Long press button PB0 for >10 seconds.
    2. The LEDs will blink 3 times. Keep holding the button until you see the QR code refresh on the small display.

EFR32MG12

This example functions as a light bulb device type, with on/off capabilities. The steps were verified on SiLabs EFR32MG12 (Mighty Gecko) development board.

This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005.

Initial setup

  1. Install dependencies as specified in the connectedhomeip repository:
    1. Building Matter
    2. Building the EFR32 Lighting Example
  2. Install Simplicity Commander and make sure its binary (commander) is in your PATH. For example:
    export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
  3. Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
  4. Clone and initialize the connectedhomeip repo:
    cd ~
    git clone https://github.com/project-chip/connectedhomeip.git
    cd connectedhomeip
    git fetch origin v1.0-branch
    git checkout FETCH_HEAD
    git submodule update --init --recursive
    source ./scripts/activate.sh
  5. Export environment variables:
    export EFR32_BOARD=BRD4161A

Build the image and flash the board

  1. Build the image for the lighting app:
    cd examples/lighting-app/efr32
    source third_party/connectedhomeip/scripts/activate.sh
    gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
    ninja -C out/debug
    The image will be generated in out/debug folder.
  2. Connect the EFR32 board with your computer and flash the image to your EFR32 board:
    python3 out/debug/chip-efr32-lighting-example.flash.py --erase

Validate the example

  1. Check logs from your board. Open two terminal windows.
    1. In the first window:
      JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
    2. In the second window:
      JLinkRTTClient
      The logs will be printed out in the second window.
  2. The device should present itself as a USB serial device on your computer. You may look it up in /dev/:
    ls -la /dev/tty*
    You can open the serial console with minicom or screen. For example, if the device is at /dev/ttyACM0:
    screen /dev/ttyACM0 115200
    The serial console allows you to enter OpenThread commands (for example, state).
  3. If the EFR32 board has been paired before, it's recommended that you factory reset it:
    1. Long press button PB0 for >10 seconds.
    2. The LEDs will blink 3 times. Keep holding the button until you see the QR code refresh on the small display.

Next steps

When your Matter example has been successfully built, create a developer project.