Multi-Configuration and Multi-Board Builds#
Overview#
A multi-configuration workflow lets you generate or build the same project workspace with different configurations. For example, you can target different boards, Software Development Kit (SDK) versions, build types, or output directories.
Instead of modifying the project files for each configuration, keep the common settings in the .slconf file and override only the required values from the command line.
Example: Default Workspace Configuration#
[toolchain] [slc] sdk-package-path = [ "../home/.silabs/slt/installs/conan/p/simpleb526998f4a4d/p",] with = [ "brd4187c", "brd4002a",] output-type = "vscode" project-file = "../home/.silabs/slt/installs/conan/p/simpleb526998f4a4d/p/app/bluetooth/example/bt_soc_blinky/bt_soc_blinky.slcp" copy-sources = "TRUE" new-project = "TRUE" toolchain = "gcc"
Generate the project without overriding the default workspace configuration:
slc generate <path-to-project.slcp>
Example: Override Board or SoC Part Number#
Use the --with option to override the default board or system-on-chip (SoC) device.
slc generate <path/to/example.slcp> --with <board_id or part_number>
Target a Specific Device#
slc generate $SISDK/app/bluetooth/example/bt_soc_empty/bt_soc_empty.slcp -np -d ~/projects/test-soc-empty -name=test-soc-empty --with EFR32MG12P232F512GM68
Target a Specific Board#
slc generate $SISDK/app/common/example/blink_baremetal -np -d blinky -name=blinky -o makefile --with brd4166a
Example: Override for a Different SDK#
Generate the project by using a different SDK.
slc generate --sdk "$(slt where simplicity-sdk)" --output-dir build/latest-sdk
Example: CI Multi-Configuration Flow#
Generate the Project#
slc generate <path/to/example.slcp> -np --with brd4187c -d build/brd4187c -o makefile
Build the Project#
cd build/brd4187c/cmake_gcc cmake --workflow --preset project
In this workflow, .slconf provides shared workspace defaults, while Silicon Labs Configurator CLI (SLC-CLI) command-line arguments define each specific configuration. You can generate or build multiple project variants from the same workspace without repeatedly editing configuration files.
For more information about configuration precedence, see Using .slconf with SLC. For a complete Continuous Integration/Continuous Delivery (CI/CD) pipeline example, see CI/CD Integration.