Skip to content

Toolchain Mapping (.slct)

The toolchain mapping file has the .slct extension. It contains a mapping of generic SLC toolchain settings to options for specific IDE exporters.

The toolchain setting mapping file contains a schema for allowed content in the toolchain_setting key in .slcp and .slcc files, and maps these options to properties understood by the IDE exporter tool.

The purpose of defining structured properties for toolchain settings is to enable integration with IDEs that may provide graphical configuration of such settings.

The .slct file has two top-level properties, schema and exporter.

Schema

The schema section is a map where the keys correspond to toolchain_setting options, and the values are Kwalify schemas for the value of the option.

Example

Example schema:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
schema:
  cake:
    type: str
  fish:
    type: str
    enum:
      - tuna
      - marlin
  foo:
    type: str

Example usage in .slcc or .slcp file:

1
2
3
4
5
6
7
toolchain_settings:
  - option: cake
    value: lie
  - option: fish
    value: marlin
  - option: foo
    value: true

Exporter

The exporter section is a list of exporter mappings, where each mapping is an object with two mandatory keys:

  • exporter_id - unique ID of the exporter mapping
  • version - version of the exporter mapping

The rest of the object content is specific to the exporter, and not defined by the SLC specification.

Simplicity Studio Exporter

The Simplicity Studio Exporter definition is used by the SLC tools from Silicon Labs, both for the SLC CLI and Simplicity Studio GUI. The exporter_id of this definition is simplicity_studio. The following section is descriptive, and serves as an example of a real-world exporter. It does not constitute a complete specification for the Simplicity Studio Exporter.

This exporter takes two additional top-level keys, setting and mapping. The setting section contains a list of exporter settings that are always applied to all projects. The mapping section contains a map from toolchain_setting keys as defined in the schema to a list of exporter settings. If the setting is an enumeration, the map is from key to enum value to a list of exporter settings.

Each exporter setting is an object containing the following items:

  • tool - the tool this option applies to, defined by the Simplicity Studio Project Model
  • option - the tool option to set
  • value - the value to set
  • action (optional) - if set to append, the value is appended rather than replaced

The value of an exporter setting may use the following replacement variables:

  • {{value}} - the value passed from the toolchain_setting
  • {{project_name}} - the name of the project, as defined by the .slcp file

The mapping section, including any enumeration mapped within, must exhaustively cover all keys and enum values defined by the schema. This means that options that don't map to anything must explicitly map to an empty list.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
exporter:
    - exporter_id: simplicity_studio
      setting:
          - tool: compiler
            option: optimization
            value: size
      mapping:
          cake:
              - tool: compiler
                option: misc
                action: append
                value: "-W{{value}}"
          fish:
              tuna:
                  - tool: linker
                    option: misc
                    action: append
                    value: "-ltuna"
              marlin: []
          foo: []
Back to top