Explore the VS Code Extension#

After you install the Simplicity Studio for VS Code extension, a Welcome screen displays with getting started instructions for using the extension.

  • Download Simplicity Studio: Because the extension relies on projects generated and configured by Simplicity Studio, your first task is to download and install Simplicity Studio 5 or Simplicity Studio 6 (Beta).

  • Generate a VS Code Project: Indicates a project must be generated in Simplicity Studio to use the project in the extension

  • Explore More Resources: Links are provided for the online user's guide, training, and tutorials.

    The Explore More Resources pane with a list of links to the Simplicity Studio User's Guide, Tips and Tricks, Training and Tutorials, and Silicon Labs Community. A Learn More button is under this list of links.The Explore More Resources pane with a list of links to the Simplicity Studio User's Guide, Tips and Tricks, Training and Tutorials, and Silicon Labs Community. A Learn More button is under this list of links.

  • Ready to Start: Click the Si icon in the left navigation bar to find the heart of the extension functionality.

  • Mark Done: Click this link to stop the Welcome screen from displaying when you launch the Simplicity Studio VS Code extension.

Dependencies for the Simplicity Studio for VS Code Extension#

You can view the dependencies for the Simplicity Studio VS Code extension by selecting the extension in VS Code and then clicking the DEPENDENCIES tab. The current dependencies are:

  • Cortex-Debug

  • C/C++

  • C/C++ Themes

  • CMake

  • YAML

Settings for the Simplicity Studio for VS Code Extension#

You can explore the extension settings by:

  1. Selecting the extension.

  2. Clicking the Settings (gear) icon and selecting Settings from the pop-up menu.

    The Settings tab displays.

    The Settings tab for the Simplicity Studio for VS Code extension. The User tab is open inside the Settings tab by default.The Settings tab for the Simplicity Studio for VS Code extension. The User tab is open inside the Settings tab by default.

Because there are currently 27 settings and each setting has a description on the Settings tab, only a few important settings are listed below:

  • Silabs: Feature Select: Use this setting to indicate whether the extension is being used with Simplicity Studio 5 (Simplicity Studio) or with Simplicity Studio 6 (Simplicity Studio v6). The availability of various features and how the links to the tools are discovered varies are based on this setting.

  • Build Before Flash: This setting controls whether a project is built before flashing the target. If you always manually build the project to check for errors before flashing, you can deselect this setting.

  • Build Before Debug: This setting controls whether a project is built before launching the debugger. If you always manually build and flash the project before debugging, you can deselect this setting. When this setting is selected, you can click the Debug icon to perform all three settings - build, flash, and debug - after you make changes to a project.

  • Device Name: A custom board setting that lets you override the target part. This is an important setting if the other device detection and configuration options are not working.

Si View#

The Si View has four possible containers:

  • Workspace

  • Devices

  • Tools

  • Learn and Support

Workspace Container#

When you select Si view for the first time, no items have been added to the Workspace container, and so links display to either Open Simplicity Studio or Import Workspace. If you have not created any projects in Simplicity Studio, click Open Simplicity Studio to create one or more projects and.or solutions.

Note: In this context, the term, project, refers to projects and solutions, except when discussing explicit solution functionality.

After you create one or more projects, click Import Workspace to add the project(s) to the Si Workspace container. Any recently opened workspaces are displayed in the dropdown list. If you do not see them, click Search to find your Simplicity Studio projects or workspaces. You can select either Simplicity Studio 5 or Simplicity Studio 6 VS Code-compatible projects. A Simplicity Studio generated project is considered compatible, if its generator list contains Visual Studio Code. This is the default for all Simplicity Studio 6 projects.

Workspace Toolbar#

The Workspace toolbar has three icons:

The Workspace toolbar showing the Refresh, Import Workspace, and Settings iconsThe Workspace toolbar showing the Refresh, Import Workspace, and Settings icons

  1. Refresh Workspace: Click to refresh your workspace when you have made changes to the workspace outside VS Code.

  2. Import Workspace: Click to import a workspace as described above.

  3. Settings: Click to display the settings for the Simplcity Studio VS Code extension.

Connect and Select Previous Workspaces#

Follow these steps to connect and select previous workspaces:

  1. Import the Simplicity Studio Workspace.

  2. Select a previously connected workspace.

    • Selecting a previously connected workspace automatically loads the folder content into the workspace view.

    • Edit the list using settings (V5 workspaces).

    Important: Only projects and solution generated with Visual Studio Code generator are displayed.

  3. Click the Browse button to browse the folders for a new workspace.

    • Selecting a new workspace automatically loads the folder content into the workspace view.

      The contents of a folder loaded into the workspace view after a new workspace is selectedThe contents of a folder loaded into the workspace view after a new workspace is selected

Workspace Details#
  1. Si icon: The number in the circle at the lower right corner of this icon shows how many notifications are waiting. These are listed in the tooltip when you hover your pointer over the Si icon.

  2. Tooltip: This displays when the workspace has changes.

  3. Refresh icon: Click to update the content in your workspace.

An example of a workspace showing a list of projects with these features numbered: 1 for the Si icon, 2 for the tooltip, and 3 for the Refresh iconAn example of a workspace showing a list of projects with these features numbered: 1 for the Si icon, 2 for the tooltip, and 3 for the Refresh icon

Actions for a Displayed Project#

The following toolbar icons are available for a displayed project:

  • Build: If multiple build configurations are present for a project, you must select one build configuration before you build a project.

  • Flash:

    • Before executing a flash, you must choose a binary file to flash. Select from .hex, .bin, or .rsp. For binary files that do not contain address information, such as .bin, you should also add a starting memory address.

    • When multiple compatible devices are connected (see settings: Board display), choose one.

  • Debug:

    • When multiple compatible devices are connected (see settings: Board display), choose one.

    • When the debug section starts successfully, the Run and Debug view displays.

    • When Debug is launched, a launch.json file is created or updated in the .vscode folder with information about the Silicon Labs debug session. If you have your own launch.json file and want to keep it, the corresponding Overwrite launch file setting should be turned off.

    An example of a workspace showing the action icons at the right of a project folder in this order from left to right: Build, Flash, and DebugAn example of a workspace showing the action icons at the right of a project folder in this order from left to right: Build, Flash, and Debug

Actions for a Displayed Solution#

The following actions are available for a displayed solution:

  • Build: In this version only, one build configuration is available for a solution.

  • Flash:

    • Before executing a flash, you must choose a binary file to flash.

    • When multiple compatible devices are connected (see settings: Board display), choose one.

  • Debug:

    • When multiple compatible devices are connected (see settings: Board display), choose one.

    • When the debug section starts successfully, the Run and Debug view displays.

    • When Debug is launched, a launch.json file is created or updated in the .vscode folder with information about the Silicon Labs debug session. If you have your own launch.json file and want to keep it, the corresponding Overwrite launch file setting should be turned off.

    An example of a solution in a workspace showing the aciton icons at the right of the solution name in this order from left to right: Build, Flash, and DebugAn example of a solution in a workspace showing the aciton icons at the right of the solution name in this order from left to right: Build, Flash, and Debug

Context Menu for a Project Folder#

Right-click a project folder to display a context menu with the following actions:

  1. Add new file or folder to the selected folder

    • When you select this action, an additional input dialog displays.

    • If the text input contains a file extension, a file is created; otherwise, a folder is added.

    • You cannot add a folder or file to the top-level folder of a solution.

  2. Clean: Does a clean build of the project.

  3. Build: Builds the project.

  4. Flash: Flashes the project binary to the target.

  5. Debug: Launches the debugger for the project.

  6. Open Configurators 2.0: Opens the configurators screen with the following sections:

    • Additonal Sources: Adds files and folders previously added to the project to the build configuration.

      • Folder Name: Adds a source file folder to the build configuration.

      • File Path: Adds include file paths to the build configuration. The added path is searched for header files included by source files.

    • Build Configurator: Adjusts the build configurations.

      • Configurations: Selects an existing build configuration to edit or rename, add, copy, or delete a configuration.

      • Definition (build symbols)

        • Edit or delete an existing definitions.

        • Add new definitions.

      • Compiler Flags: Add, edit or delete compiler flags for C, CPP, or ASM.

      • Save your changes.

    • Debug Configurator: Adjusts the debugger configuration.

      The debug configuration is created automatically with default settings for the project. The Debug Configurator lets you change the settings manually.

      • Select from the available debug configurations to edit.

      • Rename, add, copy, or delete a debug configuration.

      Debug Configurator Fields

      A list of the debug configurator fieldsA list of the debug configurator fields

      • CWD: The current working directory or workspace folder.

      • Device: The debug device name, it may be different than the actual device OPN depending on currently supported J-Link support. The default setting should be compatible with J-Link.

      • Executable: The debugger-compatible project binary file [i.e., a binary file with executable and linking format (ELF) debug information].

      • GDB Path: The path to the arm gdb client.

      • RTOS: The real-time operating system (RTOS) used by the project, if any. This loads the GDB RTOS plugin for the debug session.

      • Request: Launch

      • SVD File: The special function register (sfr) file for the debugger debug device (target). This file should be downloaded automatically by the extension based on the project properties.

      • Server path: The path to the GDB server.

      • Server type: J-Link, the only server type currently supported.

      • Show dev debug output: The format to use in the output in the Packet Trace Interface (PTI) debug console.

      • Type: The debug configuration type. Currently cortex-debug is the only supported debug configuration type.

      • Arm Toolchain path: Use to override the default toolchain path.

      • Break After Reset: If Run to entry point is blank, select this option to stop the debugger after a device is reset.

      • IP address: The IP address for the networked J-Link debug adapters.

      • Run to entry point: The initial breakpoint for the debug session. The default is run to main.

      • Serial Number: The serial number for the USB-connected debug adapters. This is when multiple debug adapters are connected to the computer.

  7. Save your debug configurator changes.

Context Menu Within a Project#

When you are in a project, right-click a folder to display a context menu with the following actions:

  1. New File / Folder here: Adds a new file or folder to the selected folder.

    • When you choose this, an additional input dialog displays.

    • If a text input contains a file extension, a file is created; otherwise, a folder is added.

    • You cannot add a folder or file to the top-level folder of a solution.

  2. Rename: Changes the name of a selected folder.

    • You can rename projects and solutions in Simplicity Studio only.

    • You can rename sub-projects of a solution in Simplicity Studio only.

    • Renaming a folder generated in Simplicity Studio may cause the project to malfunction.

  3. Delete: Deletes a selected folder.

    • You can delete projects and solutions in Simplicity Studio only.

    • You can delete sub-projects of a solution in Simplicity Studio only.

    • Deleting a folder generated in Simplicity Studio may cause the project to malfunction.

A context menu in a project with these three options in this order from top to bottom: New File Folder here, Rename, and DeleteA context menu in a project with these three options in this order from top to bottom: New File Folder here, Rename, and Delete

Context Menu for a Source File#

Right-click a source file to open a context menu with the following actions:

  1. Rename: Changes the name of the selected file.

    Renaming a file generated in Simplicity Studio may cause the project to malfunction.

  2. Delete: Deletes the selected file.

    Deleting a file generated in Simplicity Studio may cause the project to malfunction.

A context menu for a source file with these two options in this order from top to bottom: Rename and DeleteA context menu for a source file with these two options in this order from top to bottom: Rename and Delete

File-specific Context Menu#

Right-click a Simplicity Studio 6 tool or project file to open a file-specific context menu that may include opening it in Simplicity Studio 6 or in a text editor.pintool file.

Show the selected file in VSC Explorer by moving the focus to the selected file in the VSC Explorer view.

Successfully built configuration under the project

  1. From the project folder toolbar, click the Flash icon.

    • Before executing a flash, you must choose a binary file to flash. Select from .hex, .bin, or .rsp. For binary files that do not contain address information, such as .bin, you should also add a starting memory address.

    • When multiple compatible devices are connected (see settings: Board display), choose one.

  2. From the project folder toolbar, click the Debug icon.

    • When multiple compatible devices are connected (see settings: Board display), choose one.

    • When the debug section starts successfully, the Run and Debug view displays.

    • When Debug is launched, a launch.json file is created or updated in the .vscode folder with information about the Silicon Labs debug session. If you have your own launch.json file and want to keep it, the corresponding Overwrite launch file setting should be turned off.

    A file-specific context menu showing four files: bt_soc_blinky.bin, bt_soc_blinky.gbl, bt_soc_blinky.hex, and bt_soc_blinky.s37A file-specific context menu showing four files: bt_soc_blinky.bin, bt_soc_blinky.gbl, bt_soc_blinky.hex, and bt_soc_blinky.s37

Status Bar#

When you select a file from an opened project in VS Code explorer, the shortcuts to build, flash, and debug display in the status bar with the project name that contains the file you selected.

  1. A file selected in the EXPLORER panel of VS Code

  2. Shortcuts to build, flash and debug

A file selected in the Explorer panel of VS Code and the Build, Flash, and Debug icons highlighted in the toolbar at the bottom left of the screenA file selected in the Explorer panel of VS Code and the Build, Flash, and Debug icons highlighted in the toolbar at the bottom left of the screen

You can initiate these by one or more additional input steps, depending on the number of opened projects and the number of connected devices.