Using .slconf with Silicon Labs Configurator (SLC)#
Overview#
In Silicon Labs Configurator command-line interface (SLC-CLI) workflows, the .slconf file is a workspace-level source of default configuration values. When you run an SLC command, SLC can use values from .slconf for settings such as tool paths, Software Development Kit (SDK) selection, and project generation options, so you do not need to repeat them on every command.
Command-line interface (CLI) arguments take precedence over .slconf values. Use .slconf for shared defaults in local and Continuous Integration (CI) environments, and pass CLI arguments only when you need to override those defaults for a specific run.
Using .slconf helps standardize development environments while still allowing overrides when necessary.
Configuration Precedence#
When a CLI command runs, configuration values are resolved in the following order (highest precedence first):
Precedence | Source | Description |
|---|---|---|
1 (Highest) | Command-line arguments | Explicit options provided with an |
2 |
| Workspace configuration file that contains project defaults. |
3 (Lowest) | Tool defaults | Built-in default values used when no other configuration is provided. |
Note: Command-line arguments always override values defined in
.slconf.
Example 1: Using the Workspace Configuration#
Assume the workspace contains a .slconf file with the default configurations:
slc generate <path-to-project.slcp>
Example 2: Typical Project Creation Flow#
Create project → configure → generate → build.
The Silicon Labs command-line workflow uses Silicon Labs Tool (SLT) to prepare the tool and SDK environment, and SLC-CLI to create, configure, and generate the project before you build it.
Install / prepare tools ↓ Create project ↓ Configure project ↓ Generate project files ↓ Build application
Prepare the Environment with SLT#
Use SLT to install or verify the required Silicon Labs tools and SDKs.
slt install
slt list
This step ensures that the required toolchain, SDK, and command-line components are available before project creation.
Create the Project with SLC-CLI#
Use SLC-CLI to create a new project from an example, template, or project definition.
slc generate <path/to/example.slcp> -np -d <destination> -name=<new name> --with <board or device>
Example .slconf file:
[toolchain] [slc] sdk-package-path = [ "../home/.silabs/slt/installs/conan/p/<sdk_hash>/p",] with = [ "brd4403b",] output-type = "vscode" project-file = "../home/.silabs/slt/installs/conan/p/<sdk_hash>/p/app/bluetooth/example/bt_soc_empty/bt_soc_empty.slcp" copy-sources = "TRUE" new-project = "TRUE" toolchain = "gcc"
Then generate the project with SLC:
slc generate --slt-config=slconf/my_project.slconf -d=g/my_project
The project can use default workspace settings from .slconf or custom settings. Command-line arguments can override those defaults when needed.
Configure the Project#
The SLC configuration command sets default values for the SDK and toolchain paths used by subsequent SLC commands, so you do not have to specify them every time.
Update project configuration, components, board settings, or software options by using SLC.
slc configuration
SDK configuration example:
slc configuration -sdk="C:\Users\<NAME>\SimplicityStudio\SDKs\simplicity_sdk"
Build the Application#
Build the project by invoking CMake from the project cmake_gcc directory or the workspace _cmake directory.
To run the build command, open the generated project directory. For example, if the project is generated in g/bt_soc_empty_4403b_vs, run the following commands from g/bt_soc_empty_4403b_vs/cmake_gcc:
cd <project>/cmake_gcc cmake --workflow --preset project
In this workflow, SLT prepares the development environment, and SLC-CLI manages project creation, configuration, and generation. The final build step uses the generated build files to compile the application.
Example 3: Overriding the Workspace Configuration#
To override the workspace configuration defined in a .slconf file, pass the required values as arguments to the slc command. The .slconf file provides default workspace settings, but command-line arguments take precedence for that invocation.
To temporarily use a different SDK without modifying .slconf:
slc generate app.slcp --sdk /opt/silabs/sdk/2025.6.X
For this command, SLC-CLI uses the SDK specified on the command line instead of the value stored in .slconf.
The .slconf file is not modified.
Why Use .slconf?#
Using .slconf provides several advantages:
Defines consistent workspace defaults for all developers.
Reduces repetitive command-line options.
Simplifies onboarding by centralizing project configuration.
Supports reproducible development environments.
Keeps project-specific settings under version control when appropriate.
When to Use CLI Arguments#
Use command-line arguments for temporary or task-specific overrides, such as:
Testing a different SDK version
Generating code for another device or board
Specifying a different output directory
Running CI jobs with environment-specific settings
Performing one-time experiments without changing the workspace configuration
Typical Development Workflow#
Workspace │ ├── app.slcp ├── .slconf └── pkg.toml │ ▼ slt install │ ▼ SLT installs SDKs and tools │ ▼ slc generate app.slcp │ ▼ Uses defaults from .slconf │ ▼ CLI arguments (if provided) override .slconf values │ ▼ Project is generated
In this workflow, SLT installs SDKs and tools, SLC-CLI generates the project by using .slconf defaults, and any CLI arguments that you provide override those defaults for that run.
Common Usage Examples#
Generate Using Workspace Defaults#
slc generate app.slcp
Use a Different SDK for a Single Command#
slc generate app.slcp --sdk /path/to/new/sdk
Generate for a Different Device#
slc generate app.slcp --with EFR32BG24A010F1024IM48
Specify an Alternate Output Directory#
slc generate app.slcp --output build/
Example 4: SDK Resolution Using slt where#
The slt where command prints the installation path of a package managed by SLT. Use it to locate installed tools such as SLC-CLI, Commander, CMake, or SDK packages without browsing the .silabs directory manually.
slt where <package-name>
Examples#
Find the path of a specific SDK version:
slt where simplicity-sdk/2025.12.2
Example output:
C:\Users\<username>\.silabs\slt\installs\conan\p\simplxxxxxxxxxxx\p
You can use the returned path when you invoke SLC-CLI commands or other build tools that require the SDK location. SDKs installed with SLT are stored in versioned Conan package directories rather than fixed installation locations.
Add the SDK to the Workspace#
Use the SDK path returned by slt where when you create or configure a workspace.
slc create my_project --sdk "$(slt where simplicity-sdk)"
SLC-CLI automatically uses the SDK specified in .slconf, unless you provide a different SDK on the command line.