Skip to content

Configuration Settings

The following settings are available in VS Code settings (File > Preferences > Settings):

SettingTypeDefaultDescription
zephyr-ide.toolchainDirectorystring | nullnullDirectory containing Zephyr SDK installations (e.g. subdirectories named zephyr-sdk-0.17.0). Defaults to ~/.zephyr_ide/toolchains.
zephyr-ide.globalDirectorystring | nullnullDeprecated. Use zephyr-ide.toolchainDirectory instead. Migrated automatically on startup.
zephyr-ide.tools_directorystring | nullnullDeprecated. Use zephyr-ide.toolchainDirectory instead. Migrated automatically on startup.
zephyr-ide.useGuiConfigbooleanfalseUse the graphical Kconfig editor instead of terminal-based menuconfig.
zephyr-ide.activeViewKconfigButtonenumdashboardControls what the Kconfig button in the Active Project view opens: dashboard (main summary page), kconfig-dashboard (Kconfig page of the dashboard), gui-config (west build -t guiconfig), or menu-config (west build -t menuconfig).
zephyr-ide.projectViewKconfigButtonenumkconfig-dashboardControls what the Config button in the Projects view opens for a build: kconfig-dashboard (Kconfig page of the dashboard), gui-config (west build -t guiconfig), or menu-config (west build -t menuconfig).
zephyr-ide.westNarrowUpdatebooleanfalsePass --narrow to west update to fetch only required Git history, reducing disk usage and download time.
zephyr-ide.westKeepDescendantsbooleanfalsePass --keep-descendants to west update. When enabled, west will not reset a project if its current HEAD is a descendant of the manifest revision.
zephyr-ide.westZephyrExportbooleanfalseRun west zephyr-export after a successful west update. This registers the Zephyr CMake package so that out-of-tree applications can find Zephyr with find_package(Zephyr).
zephyr-ide.suppressWorkspaceWarningbooleanfalseSuppress the notification about missing ZEPHYR_BASE / ZEPHYR_SDK_INSTALL_DIR environment variables.
zephyr-ide.venvFolderstring | nullnullCustom Python virtual environment path. Defaults to .venv in the workspace setup path.
zephyr-ide.automaticProjectSelectionbooleantrueAutomatically switch the active project when editor focus changes to a file belonging to a different project.
zephyr-ide.useClangdbooleanfalseUse clangd for IntelliSense instead of the C/C++ extension. When enabled, sets C_Cpp.intelliSenseEngine to disabled and configures clangd.arguments with the Zephyr SDK query-driver. Requires the clangd VS Code extension.
zephyr-ide.scaVariantstring (enum)"none"Static Code Analysis tool enabled on pristine builds via -DZEPHYR_SCA_VARIANT. See Static Code Analysis below.
zephyr-ide.scaCustomVariantstring | nullnullCustom SCA variant name used when zephyr-ide.scaVariant is "custom". Must match a cmake/sca/<name>/sca.cmake entry in your Zephyr tree (e.g. sparse, codechecker).
zephyr-ide.buildBeforeFlashbooleanfalseAutomatically build before flashing when using the Zephyr IDE: Flash command. The dedicated Build and Flash command always builds first regardless of this setting.
zephyr-ide.separateBuildDebugProfilebooleanfalseExpose a separate Build & Debug bind slot (buildDebug) in Runner Profiles. When enabled, Build and Debug and Debug can each have an independent runner or launch configuration binding. When disabled (default), the single Debug slot drives both actions. See Build-and-Debug slot below.
zephyr-ide.projectVariableDefaultsstring[][]Default project variable names pre-populated in the Project Details panel. Variables not yet defined on a project are shown as empty.
zephyr-ide.buildVariableDefaultsstring[][]Default build variable names pre-populated in the Project Details panel. Variables not yet defined on a build are shown as empty.
zephyr-ide.runnerProfilesarray[]User-scope Runner Profiles ({ "name", "flash", "debug", "attach" }) available across all your workspaces. Workspace .vscode/zephyr-ide.json#runnerProfiles overrides this on name collision. Edit interactively from the Zephyr IDE: Open Runner Profile Panel command. See Runner Profiles below.

These settings control which action buttons appear in the IDE for Zephyr status bar group:

SettingTypeDefaultDescription
zephyr-ide.statusBar.showBuildPristinebooleantrueShow the Build Pristine status bar button. Restart VS Code to apply.
zephyr-ide.statusBar.showBuildbooleantrueShow the Build status bar button. Restart VS Code to apply.
zephyr-ide.statusBar.showFlashbooleanfalseShow the Flash status bar button. Restart VS Code to apply.
zephyr-ide.statusBar.showBuildFlashbooleantrueShow the Build and Flash status bar button. Restart VS Code to apply.
zephyr-ide.statusBar.showDebugbooleanfalseShow the Debug status bar button. Restart VS Code to apply.
zephyr-ide.statusBar.showBuildDebugbooleantrueShow the Build and Debug status bar button. Restart VS Code to apply.

This is the workspace file used for projects/builds/tests, runner profiles, and SDK/blob requirements. The extension preserves unknown top-level keys, so you can also keep your own custom top-level metadata in the file.

{
"projects": {
"blinky": {
"name": "blinky",
"rel_path": "apps/blinky",
"customVars": {
"jlink_device": "STM32F401RE"
},
"confFiles": {
"config": [
{ "path": "apps/blinky/prj.conf" },
{ "path": "apps/blinky/debug.conf", "extra": true }
],
"overlay": [
{ "path": "apps/blinky/boards/nucleo_f401re.overlay" }
]
},
"buildConfigs": {
"build/nucleo_f401re": {
"name": "build/nucleo_f401re",
"rel_path": "out/blinky/nucleo_f401re",
"board": "nucleo_f401re",
"relBoardDir": "zephyr/boards/st",
"relBoardSubDir": "nucleo_f401re",
"revision": "",
"compilerOptimization": "debug",
"westBuildArgs": ["--pristine"],
"westBuildCMakeArgs": ["-DCONFIG_DEBUG_OPTIMIZATIONS=y"],
"activeProfile": "jlink-stm32f4",
"bindOverrides": {
"flash": { "extraArgs": ["--erase"] }
},
"customVars": {
"bmp_port": "/dev/ttyACM0"
},
"confFiles": {
"config": [],
"overlay": []
}
}
},
"twisterConfigs": {
"smoke_hardware": {
"name": "smoke_hardware",
"platform": "hardware",
"tests": ["sample.basic.blinky"],
"args": "--inline-logs",
"serialPort": "COM3",
"serialBaud": "115200",
"boardConfig": {
"board": "nucleo_f401re",
"relBoardDir": "zephyr/boards/st",
"relBoardSubDir": "nucleo_f401re"
}
}
}
}
},
"runnerProfiles": [
{
"name": "jlink-stm32f4",
"flash": {
"kind": "runner",
"runner": "jlink",
"extraArgs": ["--device", "STM32F401RE", "--speed", "4000"]
},
"debug": {
"kind": "launch",
"name": "STM32F4 Debug"
},
"attach": {
"kind": "auto"
}
}
],
"toolchains": ["arm-zephyr-eabi"],
"sdkVersion": "0.17.0",
"blobs": ["hal_nordic"],
"pipPackages": ["dtsh", "pyocd"],
"pipRequirements": [
"external/nrf/scripts/requirements.txt",
"external/bootloader/mcuboot/boot/zephyr/scripts/requirements.txt"
],
"sampleProjects": [
{
"name": "hello_world",
"rel_path": "zephyr/samples/hello_world",
"buildConfigs": {},
"confFiles": { "config": [], "overlay": [] },
"twisterConfigs": {}
}
],
"commands": {
"linux": [
"echo linux setup complete"
],
"windows": [
"echo windows setup complete"
]
}
}
FieldTypeRequiredNotes
projectsRecord<string, ProjectConfig>YesPrimary workspace project/build/test data.
runnerProfilesRunnerProfile[]NoWorkspace-scope profiles. Edited from Runner Profile panel.
toolchainsstring[]NoRequired Zephyr SDK toolchain names (e.g. arm-zephyr-eabi).
sdkVersionstringNoPreferred SDK version used when SDK auto-install is needed.
blobsstring[]NoWest modules requiring west blobs fetch <module>.
pipPackagesstring[]NoAdditional Python packages installed into the workspace virtual environment during setup (e.g. dtsh, pyocd). The extension always installs dtsh and pyocd; packages listed here are added on top.
pipRequirementsstring[]NoWorkspace-relative or absolute paths to requirements.txt files installed into the workspace virtual environment alongside pipPackages. Both are installed in a single step with no extra prompts.
sampleProjectsProjectConfig[] | string[]NoOptional project snapshots used by Zephyr IDE: Add Sample Projects From File. String paths are accepted for backward compatibility.
commands{ linux?: string[], windows?: string[], mac?: string[] }NoOptional platform-specific post-setup commands. Users are prompted to choose which commands to run during setup or when invoking Zephyr IDE: Run Commands from zephyr-ide.json.
any other keyany JSONNoPreserved by the extension; can be read with Zephyr IDE: Get Zephyr IDE JSON Variable.
FieldTypeRequiredNotes
namestringYesProject display name/key.
rel_pathstringYesProject path relative to workspace root.
buildConfigsRecord<string, BuildConfig>YesBuild configurations keyed by build name.
confFilesConfigFilesYesProject-level Kconfig/devicetree file entries.
twisterConfigsRecord<string, TwisterConfig>YesTwister test configurations.
customVarsRecord<string, string>NoPer-project custom variables.
FieldTypeRequiredNotes
namestringYesBuild config name.
boardstringYesZephyr board identifier.
relBoardDirstringNoRelative path to a boards directory (e.g. boards or custom/boards). Its parent directory is passed as BOARD_ROOT to CMake — e.g. boards → workspace root becomes BOARD_ROOT; custom/boards<workspace>/custom becomes BOARD_ROOT. Must point at a boards directory, not at a vendor subfolder inside it. Leave unset to use Zephyr’s built-in boards.
relBoardSubDirstringNoBoard subdirectory name/path. Used to construct the full board path for IDE navigation.
compilerOptimizationstringNoCompiler optimization preset. One of debug, speed, size, none. When omitted, no optimization flag is passed (configured via KConfig).
westBuildArgsstring[]YesAdditional non-CMake west build args.
westBuildCMakeArgsstring[]YesAdditional CMake args passed to west build.
confFilesConfigFilesYesBuild-level Kconfig/devicetree file entries.
revisionstringNoBoard revision (if used).
activeProfilestringNoActive runner profile name for this build.
bindOverridesBuildBindOverridesNoPer-slot extra-arg overrides appended after profile args.
customVarsRecord<string, string>NoPer-build custom variables.
rel_pathstringNoManual field (no GUI): build output path relative to workspace root. Absolute paths are ignored; paths escaping workspace root are rejected; empty/invalid values fall back to the path composed as project.rel_path/build.name.
FieldTypeRequiredNotes
configConfigFileEntry[]YesKconfig file entries.
overlayConfigFileEntry[]YesDevicetree overlay entries.

ConfigFileEntry shape:

FieldTypeRequiredNotes
pathstringYesRelative file path.
extrabooleanNotrue = EXTRA_CONF_FILE or EXTRA_DTC_OVERLAY_FILE; omitted/false = primary override file (CONF_FILE or DTC_OVERLAY_FILE).
FieldTypeRequiredNotes
namestringYesTwister config name.
platformstringYesnative_sim, qemu, or hardware.
testsstring[]YesTest IDs or "All".
argsstringYesExtra Twister arguments.
serialPortstringNoHardware serial port for platform: "hardware".
serialBaudstringNoHardware serial baud for platform: "hardware".
boardConfigBoardConfigNoRequired for hardware platform flows.

BoardConfig shape:

FieldTypeRequiredNotes
boardstringYesBoard identifier.
relBoardDirstringNoAdditional board dir, relative to workspace root.
relBoardSubDirstringNoBoard subdirectory path.
revisionstringNoBoard revision.
FieldTypeRequiredNotes
namestringYesProfile name.
flashRunnerBindYesUsed by Flash/Build-and-Flash.
debugRunnerBindYesUsed by Debug and (default) Build-and-Debug.
attachRunnerBindYesUsed by Debug Attach.
buildDebugRunnerBindNoOptional dedicated Build-and-Debug bind when zephyr-ide.separateBuildDebugProfile is enabled.

RunnerBind variants:

  • { "kind": "auto" }
  • { "kind": "runner", "runner": "openocd", "extraArgs": ["--foo", "bar"] }
  • { "kind": "launch", "name": "My Launch Config" } (debug/attach slots only)

BuildBindOverrides shape:

FieldTypeRequiredNotes
flash{ extraArgs?: string[] }NoAppended only if slot resolves to runner kind.
buildDebug{ extraArgs?: string[] }NoSame rule.
debug{ extraArgs?: string[] }NoSame rule.
attach{ extraArgs?: string[] }NoSame rule.

A Runner Profile is a named bundle of three bind slots — flash, debug, and attach — that a build can attach to.

Profiles are stored in two places, merged on load (workspace overrides user on name collision):

User settings (settings.json) — shared across all your workspaces:

{
"zephyr-ide.runnerProfiles": [
{
"name": "BMP via ttyACM0",
"flash": {
"kind": "runner",
"runner": "blackmagicprobe",
"extraArgs": ["--gdb-serial", "/dev/ttyACM0"]
},
"debug": {
"kind": "runner",
"runner": "blackmagicprobe",
"extraArgs": ["--gdb-serial", "/dev/ttyACM0"]
},
"attach": {
"kind": "runner",
"runner": "blackmagicprobe",
"extraArgs": ["--gdb-serial", "/dev/ttyACM0"]
}
}
]
}

Workspace (.vscode/zephyr-ide.json) — committed alongside the project:

{
"runnerProfiles": [
{
"name": "jlink-stm32f4",
"flash": {
"kind": "runner",
"runner": "jlink",
"extraArgs": ["--device", "STM32F401RE", "--speed", "4000"]
},
"debug": { "kind": "launch", "name": "STM32F4 Debug" },
"attach": { "kind": "auto" }
}
]
}

Run Zephyr IDE: Open Runner Profile Panel (or click Manage… next to the Runner Profile section in the Project Build panel) for a full CRUD UI.

The Profile… button in the Project Build panel opens a QuickPick that sets a local override for the active build — stored in VS Code workspace state only, never in .vscode/zephyr-ide.json.

The active profile for a build is resolved from these layers (highest priority first):

PriorityLayerStorageCommitted?
1Local slot bindlocalBinds[slot] in BuildState (per-slot runner)VS Code workspaceStateNo
2Local profile overridelocalActiveProfile in BuildStateVS Code workspaceStateNo
3Workspace JSONbuildConfigs[build].activeProfile.vscode/zephyr-ide.jsonYes
4None — all bind slots fall back to runners.yaml defaults

When a local override is active, the status bar chip shows a * suffix (e.g. $(chip) openocd *) and tree views label the profile as (local). Slot-level local binds show an amber (local) badge in the Project Build panel.

The typical per-developer workflow:

  1. Click Profile… in the Project Build panel to choose a named profile locally (no JSON changes).
  2. Click Local Bind… next to any slot to override just that slot’s runner locally.
  3. Open the Runner Profile Panel to publish: Update profile with local changes or Create new profile from local changes.

If you need slightly different arguments on a single build without forking a whole profile, edit the build’s entry in .vscode/zephyr-ide.json directly:

{
"bindOverrides": {
"flash": { "extraArgs": ["--erase"] }
}
}

By default a Runner Profile has three slots — flash, debug, attach — and Build and Debug reuses debug.

{
"name": "jlink-stm32f4",
"flash": { "kind": "runner", "runner": "jlink", "extraArgs": ["--device", "STM32F401RE", "--speed", "4000"] },
"buildDebug": { "kind": "runner", "runner": "jlink", "extraArgs": ["--device", "STM32F401RE", "--reset"] },
"debug": { "kind": "launch", "name": "STM32F4 Debug (attach)" },
"attach": { "kind": "auto" }
}

When buildDebug is omitted (or the setting is left disabled), Build and Debug falls back to debug.

Both BuildConfig and ProjectConfig support a customVars map for user-defined key-value data that needs to flow into runner profile args, tasks.json, or launch.json.

{
"projects": {
"myproject": {
"name": "myproject",
"rel_path": "apps/myproject",
"buildConfigs": {
"debug": {
"name": "debug",
"board": "nucleo_f401re",
"relBoardDir": "zephyr/boards/st",
"relBoardSubDir": "nucleo_f401re",
"compilerOptimization": "debug",
"westBuildArgs": [],
"westBuildCMakeArgs": [],
"confFiles": { "config": [], "overlay": [] },
"customVars": {
"bmp_port": "/dev/ttyACM0"
}
}
},
"confFiles": { "config": [], "overlay": [] },
"twisterConfigs": {},
"customVars": {
"jlink_device": "STM32F401RE"
}
}
}
}

Variables are edited interactively with the Zephyr IDE: Manage Build Variables and Zephyr IDE: Manage Project Variables commands.

sampleProjects is an optional library of project snapshots stored in .vscode/zephyr-ide.json. Unlike the top-level projects map, entries under sampleProjects are not loaded automatically when the workspace opens.

Use this when you want a repository to publish a curated set of starter projects without enabling all of them by default.

  • Zephyr IDE: Modify Sample Projects (zephyr-ide.json) edits the stored library.
  • Zephyr IDE: Add Sample Projects From File lets a user import one or more stored entries into the active workspace.

Each entry can be a full ProjectConfig snapshot, or a plain string path for backward compatibility.

The optional top-level commands key lets a workspace publish platform-specific bootstrap commands that should run after west setup completes.

{
"commands": {
"linux": [
"echo linux setup complete"
],
"mac": [
"echo mac setup complete"
],
"windows": [
"echo windows setup complete"
]
}
}

Use this for repository-specific follow-up steps such as running vendor tooling bootstrap, triggering post-setup scripts, or performing project-local initialization.

  • During workspace setup, the extension prompts the user to choose which commands to run.
  • The same commands can be edited later with Zephyr IDE: Modify Commands (zephyr-ide.json).
  • Users can re-run them later with Zephyr IDE: Run Commands from zephyr-ide.json.

For safety, the extension does not silently run these commands without user selection.

Zephyr’s SCA framework lets a static analysis tool wrap every C compiler invocation during a build. The tool is selected per-build via -DZEPHYR_SCA_VARIANT=<name> at CMake configure time.

Zephyr IDE passes this flag automatically on every pristine build based on the zephyr-ide.scaVariant setting. Incremental (non-pristine) builds reuse the build.ninja that was generated during the last pristine configure, so the selected variant stays active without needing to be re-passed.

If the SCA variant setting changes between builds, the extension detects the difference in the cached pristine command and automatically triggers a pristine rebuild.

VariantSetting valueInstall required
dtdoctor"dtdoctor"None — bundled in the Zephyr repo at scripts/dts/dtdoctor_sca_wrapper.py. Requires Zephyr 3.7+.
GCC -fanalyzer"gcc"None — GCC 12+ is already in the Zephyr SDK.
Custom"custom"Whatever the variant needs. Set the name in zephyr-ide.scaCustomVariant.
None (disabled)"none"

The default is "none" (disabled).

dtdoctor is Zephyr’s built-in Devicetree diagnostic tool. It wraps the C compiler as CMAKE_C_COMPILER_LAUNCHER and, when a build fails with __device_dts_ord_* or DT_N_NODELABEL_* undeclared symbol errors, runs dtdoctor_analyzer.py and appends human-readable devicetree diagnostics to the build output.

Enables GCC’s built-in inter-procedural static analyzer. Output is standard GCC diagnostic format and appears inline in build output.

Set zephyr-ide.scaVariant to "custom" and zephyr-ide.scaCustomVariant to the variant name (e.g. "sparse", "codechecker").

When zephyr-ide.useClangd is enabled, the workspace .vscode/settings.json is automatically configured with the appropriate settings.

{
"C_Cpp.intelliSenseEngine": "disabled",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}/.vscode",
"--background-index",
"--completion-style=detailed",
"--header-insertion=never",
"--query-driver=/path/to/toolchains/**/*"
]
}

The --query-driver glob is derived from your configured toolchain directory (zephyr-ide.toolchainDirectory).