Continuous Integration/Continuous Delivery (CI/CD) Integration#

Overview#

CI/CD pipelines can use Silicon Labs Tool (SLT) and the Silicon Labs Configurator command-line interface (SLC-CLI) together. A typical CI/CD workflow installs the required toolchain, configures the Software Development Kit (SDK), generates projects from .slconf files, and builds the generated project.

Recommended CI/CD Workflow#

  1. Install all required packages using SLT (SLC-CLI, GCC toolchain, CMake, Ninja, SDK, and related packages).

  2. Configure the development environment (Java, SLT, SLC-CLI, SDK, and toolchain paths).

  3. Create or maintain project-specific .slconf files.

  4. Generate the project using SLC.

  5. Build the generated project using CMake (or Make).

For more information about installing and managing Silicon Labs development tools, see Silicon Labs Tool and Simplicity Installer.

Step 1. Install Required Packages#

Create a package recipe (pkg.slt) that contains the required tools and SDK packages.

# Install packages from a recipe
slt install -f pkg.slt

# Install using a locked package list for reproducible builds
slt install -f pkg.lock

Note: Use pkg.lock in CI/CD pipelines to keep package versions consistent across builds.

For first-time setup, see First-Time Installation Setup.

Step 2. Configure SLC-CLI#

Configure the SDK, trust the SDK signature, and set the GCC toolchain.

# Configure SDK
slc configuration -s C:\Users\user_name\.silabs\slt\installs\conan\p\simpldxxxxx\p

# Example: 
 slc configuration -s C:\Users\user_name\.silabs\slt\installs\conan\p\simpl35774a752829c\p

# Trust SDK
slc signature trust

# Configure GCC toolchain
slc configuration -gcc C:\Users\user_name\.silabs\slt\installs\conan\p\gcc-xxxxx\p

# Example:
slc configuration -gcc C:\Users\user_name\.silabs\slt\installs\conan\p\llvm-57bf89be658b9\p

Note: Replace the path segments with the package paths on your system. Use slt where <package> to locate installed packages.

Step 3. Create Project Configuration (.slconf)#

File

Description

autogen/pkg.slconf

Auto-generated file that contains SDK and tool paths. Do not modify this file.

user.slconf

User-editable configuration that includes autogen/pkg.slconf. Recommended for CI/CD customization.

Example .slconf file:

[toolchain]

[slc]
sdk-package-path = ["../home/.silabs/slt/installs/conan/p/simpleb526998f4a4d/p"]
with = [ "brd4403b","iostream_eusart:vcom"]
output-type = "vscode"
project-file = "../home/.silabs/slt/installs/conan/p/simpleb526998f4a4d/p/app/bluetooth/example/bt_soc_empty/bt_soc_empty.slcp"
copy-sources = "TRUE"
new-project = "TRUE"
toolchain = "gcc"

For more .slconf examples, see Project Generation Examples.

Step 4. Generate the Project#

Generate the project by using the .slconf file:

slc generate --slt-config=slconf/bt_soc_empty_4403b_vs.slconf -d=g/bt_soc_empty_4403b_vs

For larger projects (such as Matter), increase the generator timeout by using the --generator-timeout option:

slc generate --slt-config=slconf/MatterLightSwitchOverThreadSolution_1019a_vs.slconf -d=g/MatterLightSwitchOverThreadSolution_1019a_vs -lfewp --generator-timeout=800

Step 5. Build the Project#

Build the generated project.

cd g/bt_soc_empty_4403b_vs/cmake_gcc
cmake --workflow --preset project

Complete CI/CD Script#

The following example demonstrates a complete CI workflow:

#!/bin/bash
set -ex

export SISDK_ROOT="/path/to/simplicity_sdk"
export PATH="/usr/bin:$PATH"

slc configuration --sdk "${SISDK_ROOT}"
slc signature trust --sdk "${SISDK_ROOT}"

slc generate "examples/platform/silabs/matter-platform.slcp" -d "output/my_project" --with "brd4187c"

cd output/my_project/cmake_gcc
cmake --workflow --preset project

Multi-Board CI/CD Example#

Generate and build the same application for multiple boards by maintaining one .slconf file per board.

#!/bin/bash
set -ex

BOARDS=(
  "brd4403b"
  "brd4402a"
  "brd2902a"
)

SLCONF_DIR="slconf"
OUTPUT_DIR="g"

for BOARD in "${BOARDS[@]}"; do
    echo "Generating project for ${BOARD}..."
### Generate

    slc generate --slt-config=${SLCONF_DIR}/${BOARD}.slconf -d=${OUTPUT_DIR}/${BOARD}

### Build

    cd ${OUTPUT_DIR}/${BOARD}/cmake_gcc
    cmake --workflow --preset project
    cd -

    echo "Build completed for ${BOARD}"
 done

CI/CD Benefits#

Feature

Benefit

pkg.lock

Ensures reproducible builds by locking package versions

autogen/pkg.slconf

Automatically populates SDK and tool paths

user.slconf

Provides a portable, version-controlled project configuration

--non-interactive

Enables fully unattended CI/CD execution

--generator-timeout

Prevents generation failures for large or complex projects

Per-board .slconf files

Simplifies multi-board build automation

SLT package management

Installs and manages all required tools from a single recipe

Workflow Summary#

Install Packages (SLT)
        │
        ▼
Configure SDK & Toolchain
        │
        ▼
Create .slconf
        │
        ▼
Generate Project (SLC)
        │
        ▼
Build with CMake
        │
        ▼
Run Tests / Package Artifacts

This workflow supports reproducible, portable, and fully automated builds across SDK versions, toolchains, and hardware targets.