Skip to content

Settings and commands

Read this page to learn more about extension-specific settings and commands.

Command Palette

VS Code's Command Palette gives you access to all of the extension's commands.

To open the Command Palette, click on View > Command Palette from the top menu bar. You can then type nRF Connect to list all of the extension's commands.

Command Palette

nRF Terminal profile action settings

The extension adds several nRF Terminal profile actions to the Visual Studio Code terminal. You can customize the operating mode and the connection values of these profiles.

Terminal mode

The nRF Terminal profiles can work in one of the following modes:

Mode Description
character (default) In this mode, every key-press is sent directly to the connected device. This is useful for interacting with device shells, such as the Zephyr Shell.
line In this mode, the terminal displays the characters typed and then submits them to the device as a single message when you click Enter. This is useful for AT sessions and other non-shell interactions.

To change the terminal mode:

  1. Click on the Extensions icon from the Activity Bar.
  2. Find the nRF Terminal and click on the Settings icon on the bottom right corner of the extension.
  3. Click on Extension Settings.
  4. From the Nrf-connect: Terminal Mode drop-down menu, choose the desired terminal mode.

Configuration value presets

When connecting to a device, you will be prompted from the Command Palette to either use a preset for the configuration values or to select the values individually. The current preset has the following values:

115200 8n1 (baud rate: 115200, data bits: 8, stop bits: 1, parity: 'none' , rtscts: false)

To customize these values, choose the Other option from the drop-down list. The last eight recently used configurations are also displayed as options above the default.

Note

Only customize these values if you have changed the default UART driver settings, to make sure both sets of values are matching.

nRF Terminal commands

The following commands are available for nRF Terminal:

Command Description
nRF Terminal: Start terminal Starts the terminal, prompts for settings, and connects to the serial port.
nRF Terminal: Start Terminal With Previous Configuration Starts the terminal with the configuration of the last serial connection performed.
nRF Terminal: Stop terminal Stops the terminal and disconnects from the serial port.
nRF Terminal: Switch to line mode Switches the terminal to the line mode.
nRF Terminal: Switch to character mode Switches the terminal to the character mode.
nRF Terminal: Clear Clears the contents of the terminal.

You can run these commands using the Command Palette.

nRF Connect settings and commands

To view the extension's command list, open the Command Palette and type nRF Connect.

For a full overview of settings and commands, click the Extensions icon from the Activity Bar. Then, click the extension's name and open the Feature Contributions tab.

nRF Connect commands in Feature Contributions

Additional settings information

The section provides more details on certain settings used by the extension.

nrf-connect.activeAppFollowActiveEditor

This configuration setting controls whether the extension will automatically switch to the application (and build configuration, if applicable) that the open file belongs to. Switching is the default behavior. When this setting is disabled, the active application will never change automatically.

nrf-connect.applications

This is one of the application sources for the extension.

Within the workspace options, this configuration setting controls which applications are listed in the Applications View. When a new application location is added to that setting, the extension checks the application directory for build directories and adds them to the Applications View.

To remove an application from this setting, use the Remove Application button in the Applications View. This action will not remove the application files from your machine.

nrf-connect.boardRoots

This configuration setting is used to track and find custom board folders. When you add a custom board, its folder is automatically added as an entry to this setting. Entries from this list are then used to populate the Custom boards list in the Add Build Configuration page.

nrf-connect.deviceProvider

You can use this configuration setting to control which utility is used for device enumeration. The extension allows you to choose between the following options:

  • nRF Util (nrfutil) - The default device provider, bundled with the extension. This is the recommended setting for all types of devices.
  • nrfjprog - An alternative to nRF Util, included in the nRF Command Line Tools. It is limited to use with J-Link devices.

nrf-connect.taskBindings

This property stores configuration for custom tasks that are executed in place of the standard Build, Pristine Build, Flash, and Erase and Flash To Board actions after you bind custom tasks to these actions. This property is stored in either the settings.json file or under the settings key in your workspace file, depending on the structure of your project. For information on the exact syntax to use and examples of possible bindings, see Binding custom tasks to actions.

nrf-connect.toolchain.path

This setting specifies the path of the toolchain installed by the Toolchain Manager and it overrides {nrf-connect.topdir}/toolchain. If neither is set, the toolchain will be expected to be located on PATH.

The nrf-connect.toolchain.path setting is automatically set to the ${nrf-connect.toolchain:VER} variable when a released version of the nRF Connect SDK toolchain is chosen in Quick Setup or the New Application screen, or through the nRF Connect: Select nRF Connect SDK Toolchain command. The variable is not used when the toolchain path is expected to be present on the system path (PATH).

For more information, see nRF Connect Toolchain path resolution.

nrf-connect.topdir

This setting points to the west workspace path. It is relevant only for building freestanding applications and is the final fallback to the ZEPHYR_BASE environment variable.

The nrf-connect.topdir setting is automatically set to the ${nrf-connect.sdk:VER} variable when a released version of the nRF Connect SDK is chosen in Quick Setup or the New Application screen, or through the nRF Connect: Select nRF Connect SDK command. The variable is not used when the unreleased, latest version of the nRF Connect SDK is selected (that is, when the main branch has the x.y.99 version).

nrf-connect.west.env

This configuration setting specifies in which environment west is executed. The setting contains an object that will replace the west environment variables in your system, with the special key $base for determining the initial environment.

{
  "$base": "terminal",
}

The following table lists possible values for $base.

Value for $base Description
"terminal" The default value. With this value set, the extension picks up the platform-specific terminal environment. On Windows, this is equivalent to "process", while on Linux and macOS, this is the output of the bash -c printenv command.
"process" With this value set, the extension picks the default Visual Studio Code environment, which corresponds to the operating system variables.
null With this value set, the extension starts a new environment from scratch.

Note

$base can also be used as a keyword inside variables. In such cases, it is replaced with the value of the variable at the base environment location.

You can add other fields into this object. These will be added as environment variables, overriding any corresponding variables in the base environment.

{
  "$base": "terminal",
  "CUSTOM_ENV_VAR": "custom value",
  "OTHER_ENV_VAR": "another value",
}

nrf-connect.kconfig.executeInDefaultShell

This setting forces the Kconfig tasks started from the Actions View to be run in the default shell. This option only affects Windows machines. This is useful if the shell used to run Kconfig tasks crashes, for example when the Command Prompt is set to the default shell.