Skip to main content

Settings Reference

All the extension settings live under the Zephyr Workbench section of the VS Code settings. The wizards and tree actions write them for you; you rarely need to edit them by hand. This page lists them for reference, along with the task types and the debugger type you can use in your own tasks.json and launch.json.

Global settings

These settings are set in your User settings.

SettingDefaultDescription
zephyr-workbench.pathToEnvScript(none)Path to the environment script that loads the Zephyr environment. Set by the host tools installation.
zephyr-workbench.venv.path(empty)Path to the Python virtual environment root. Empty: use the default environment installed with the host tools. Can also be set per workspace or application folder, see Python Environments.
zephyr-workbench.venv.activatePath(empty)Deprecated. Use zephyr-workbench.venv.path instead.
zephyr-workbench.listSDKs[]Registered Zephyr SDKs. Managed by the Add Toolchain wizard.
zephyr-workbench.listIARs[]Registered IAR toolchains.
zephyr-workbench.listArmGnuToolchains[]Registered Arm GNU toolchains.
zephyr-workbench.listRustToolchains[]Registered Rust toolchains.
zephyr-workbench.sbomTotal.baseUrlhttps://sbomtotal.comBase URL of the SBOM Total verification service. Change it for a self-hosted instance. See SPDX.
zephyr-workbench.sbomTotal.spdxVersionautoSPDX version generated and analyzed by Full SBOM Total: auto, 2.3 or 3.0. auto uses SPDX 3.0 when the Zephyr tree can generate it, SPDX 2.3 otherwise.
zephyr-workbench.sbomTotal.failOnactionableWhen the SBOM verification is reported as failed: actionable (any actionable vulnerability), risk (risk verdict only) or never (always informational).
zephyr-workbench.sbomTotal.includeSdkfalseAlso generate sdk.spdx and scan it separately as build environment information. It never changes the firmware verdict.

Per-project settings

These settings are stored per folder (Workspace Folder scope): on the application folder, or on the west workspace folder for the westWorkspace.* keys. Prefer changing them through the Applications view (Change Board, Change Toolchain, the "Arguments & Environment" group, and so on, see Applications).

SettingDefaultDescription
zephyr-workbench.westWorkspace(empty)Path of the west workspace the application is attached to.
zephyr-workbench.westWorkspace.applications[]Applications declared by a west workspace, with their own application settings.
zephyr-workbench.westWorkspace.selectedApplication(empty)Selected application of the workspace, used when it declares several applications.
zephyr-workbench.sdk(empty)Path of the Zephyr SDK used by the project. The special value global lets the build system auto-discover a globally installed SDK.
zephyr-workbench.toolchainzephyrToolchain variant used for the build (ZEPHYR_TOOLCHAIN_VARIANT): zephyr, zephyr/gnu, zephyr/llvm, gnuarmemb or iar. The legacy value zephyr_sdk is migrated to zephyr automatically.
zephyr-workbench.intellisense.providercpptoolsIntelliSense provider for the application: cpptools (C/C++ extension) or clangd.
zephyr-workbench.gnuarmemb(empty)Selected Arm GNU toolchain path (GNUARMEMB_TOOLCHAIN_PATH). Must match a registered entry.
zephyr-workbench.iar(empty)IAR toolchain used by this project. Must match a registered entry.
zephyr-workbench.rust(empty)Optional Rust toolchain path, independent of the C toolchain selection.
zephyr-workbench.env.BOARD_ROOT(empty)Additional custom board definitions.
zephyr-workbench.env.SOC_ROOT(empty)Additional custom SoC definitions.
zephyr-workbench.env.DTS_ROOT(empty)Additional custom devicetree sources.
zephyr-workbench.env.ARCH_ROOT(empty)Additional custom architecture definitions.
zephyr-workbench.env.EXTRA_CONF_FILE(empty)Additional Kconfig fragment files.
zephyr-workbench.env.EXTRA_DTC_OVERLAY_FILE(empty)Additional devicetree overlay files.
zephyr-workbench.env.EXTRA_ZEPHYR_MODULES(empty)Additional Zephyr modules.
zephyr-workbench.build.west-args(empty)Additional arguments appended to the west command.
zephyr-workbench.build.active0Index of the active build configuration.
zephyr-workbench.sysbuildEnabledfalseAppend the --sysbuild flag to west build commands.
zephyr-workbench.build.configurationsThe build configurations of the application (see below).

Each entry of zephyr-workbench.build.configurations describes one build configuration:

KeyDescription
nameName of the build configuration (required).
boardIdentifier of the target board.
default-runnerPreferred west runner, used for Flash/Run without prompting.
custom-argsCustom arguments passed to the runner (for example --erase).
west-argsAdditional arguments for the west command.
west-flagsAdditional CMake -D flags appended to west build after --.
sysbuildWhen "true", append --sysbuild to west build commands.
env.EXTRA_CONF_FILEAdditional Kconfig fragment files.
env.EXTRA_DTC_OVERLAY_FILEAdditional devicetree overlay files.
env.EXTRA_ZEPHYR_MODULESAdditional modules.
env.FILE_SUFFIXOptional suffix added to Kconfig fragment and devicetree overlay filenames.

Task types

The extension registers two task types you can use in a tasks.json:

  • west: runs a west command in the Zephyr environment. The command field is one of: init, update, list, manifest, compare, diff, status, forall, boards, build, sign, flash, debug, debugserver, attach, zephyr-export.
  • zephyr-workbench: runs any command line in the application's Zephyr environment. Fields: command, args (list of arguments), config (optional: name of the build configuration whose environment is loaded), and options (cwd, env).

Example:

{
"label": "West Size",
"type": "zephyr-workbench",
"command": "west",
"args": ["build -t rom_report"],
"config": "primary"
}

The easiest way to create such a task is right-click on the application > Build Configuration > Add Custom Task (see Applications).

Migrating applications created before version 3.0.3

Since version 3.0.3, build, flash and debug no longer use tasks.json: the build arguments are managed by the extension (the "Arguments & Environment" group and the build configurations). Applications created with older versions still carry a generated .vscode/tasks.json that can conflict with the current extension. Delete the .vscode/tasks.json file from those applications, or re-import them with the Add Application wizard. Only keep the custom tasks you wrote yourself.

Debugger type

The extension contributes the zephyr-workbench debugger type ("Zephyr Workbench (west debugserver)"): it starts the GDB server through west debugserver and runs the session with Cortex-Debug. The Debug Manager generates these launch.json entries for you (named "Zephyr Workbench Debug [configuration]"). If you edit them by hand, the attributes are:

AttributeDefaultDescription
programELF file to debug (zephyr.elf). Required.
debugServerArgsArguments passed to west to start the GDB server, for example debugserver --build-dir ... --runner jlink --gdb-port 2331. Required.
gdbTargetlocalhost:3333GDB server address as host:port. Must match the port in debugServerArgs.
gdbModeprogramprogram: flash and run to main. attach: connect only.
miDebuggerPathGDB executable to use.
svdPathSVD file for the peripheral registers view.
cwd${workspaceFolder}Working directory.
serverReadyTimeout15000Milliseconds to wait for the GDB server to become ready.
note

This debugger type requires the Cortex-Debug extension. The Debug Manager also supports the cppdbg and cortex-debug types directly; see Debug Session.

Command Palette commands

Some commands are only reachable (or simply handy) from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

CommandDescription
Zephyr Workbench: Verify Host ToolsCheck the installed host tools. See Host Tools Manager.
Zephyr Workbench: Reinstall VENVRecreate the global Python virtual environment. See Python Environments.
Zephyr Workbench: Install Host ToolsRun the host tools installation again.
Zephyr Workbench: Install Host Tools (Advanced)Open the advanced installation panel.
Zephyr Workbench: Host Tools ManagerOpen the Host Tools Manager.
Zephyr Workbench: Install RunnersOpen the Install Runners panel.
Zephyr Workbench: Build ApplicationBuild the application of the file open in the editor, or ask which application to build.
Zephyr Workbench: Rebuild ApplicationPristine rebuild of the application.
Zephyr Workbench: Debug ApplicationStart a debug session for the application.
Zephyr Workbench: Debug ManagerOpen the Debug Manager.
Zephyr Workbench: Devicetree ManagerOpen the Devicetree Manager.
Zephyr Workbench: Set SBOM Total API TokenStore the API token used by the SPDX analysis.
West: Get a west versionPrint the west version in the Zephyr terminal.