Workspace Structure#

An SLC workspace is a grouping of two or more projects that are flashed to the same target, typically as a combined binary file. Post-build actions link the project artifacts and transform them into a single application image that you can flash to the target. Typical project combinations are a bootloader and an application, or secure and non-secure parts of a TrustZone-enabled bootloader and/or application.

An SLC workspace is specified by a workspace file (*.slcw extension) that conforms to the SLC Specification. The requirements for the SLCW file are in this section of the SLC Specification: Workspace (.slcw). The file contains a project section that lists the IDs of each of the projects in the workspace with the output name and the path to the project file (*.slcp file) and it also lists the post_build profile to use or the path to the postbuild file (*.slpb file).

Create a workspace by running the an slc generate command that specifies a workspace file with the --workspace argument. By default, the command places the generated output in a folder named after the workspace_name from the SLCW file unless directed to a different folder with the --destination argument. In either case, the workspace_name determines the build output name.

The file structure of the generated workspace is:

workspace_name/

  • projectA/

    • autogen

    • cmake_gcc

    • config

    • ...

  • projectB/

    • autogen

    • cmake_gcc

    • config

    • ...

  • workspace_name_cmake/

    • CMakeLists.txt

    • CMakePresets.json

  • workspace_name.slcw

  • workspace_name.slpb

  • vcsolution.conf

When you build the workspace using CMake, the project build output is in the normal ProjectName/cmake_gcc/build folder, the project post build artifacts are in the ProjectName/artifact folder, and the workspace build files are in the workspace_name_cmake/build folder. The overall workspace artifacts (the combined files for flashing or over the air updates) are in the workspace_name/artifact folder.

To create a workspace file from scratch, review an SDK example alongside the SLC Specification. SDK examples include a bootloader workspace solution or a Matter solution. The following sections provide an example of each.

Bootloader:

 ---
workspace_name: "bootloader-apploader-workspace"
label: "bootloader-apploader-workspace"
quality: "production"
description: "TrustZone is used to split into a Secure and Non-Secure bootloader.\
  \ This workspace contains the secure and non-secure part of the bootloader and builds\
  \ them together.\n"
project:
- id: "bootloader-apploader-secure"
  path: "bootloader-apploader-secure\\bootloader-apploader-secure.slcp"
  output: "bootloader-apploader-secure"
- id: "bootloader-apploader-nonsecure"
  path: "bootloader-apploader-nonsecure\\bootloader-apploader-nonsecure.slcp"
  output: "bootloader-apploader-nonsecure"
post_build:
  profile: "bootloader_tz_workspace"
  path: "bootloader-apploader-workspace.slpb"

Matter Solution:

---
workspace_name: "light-switch-app-thread-bootloader"
label: "light-switch-app-thread-bootloader"
quality: "production"
package: "matter"
description: "Matter solution containing both a Matter bootloader and Light Switch\
  \ over Thread Example on Series 3."
project:
- id: "application"
  path: "light-switch-app-thread\\light-switch-app-thread.slcp"
  output: "light-switch-app-thread"
- id: "bootloader"
  path: "matter-bootloader\\matter-bootloader-storage-single-4096k.slcp"
  output: "matter-bootloader"
post_build:
  profile: ""
  path: "light-switch-app-thread-bootloader.slpb"

Source Control Guidelines#

Source control guidelines are covered in the Simplicity Studio 6 Tips and Tricks Placing a Simplicity Studio 6 Project under Source Control section.