Starting the toolchain environment

nRF Util

tags
nRF Util

You can start the toolchain environment using the nrfutil sdk-manager toolchain launch command. Using the correct environment is important for running commands that must be executed in the toolchain environment and for properly updating repositories and tools your project depends on.

The nrfutil sdk-manager toolchain launch subcommand uses the following pattern:

nrfutil sdk-manager toolchain launch <--ncs-version <VERSION>|--toolchain-bundle-id <BUNDLE_ID>|--toolchain-path <PATH>> <[command]...|--terminal|--shell>

In this subcommand pattern, the following elements are required:

  • --ncs-version, --toolchain-bundle-id, or --toolchain-path - use one of these arguments to provide reference to the toolchain environment you want to use.
  • <[command]...|--shell|--terminal> - lets you launch a toolchain command in the environment directly, for example python3 --version or west update for the SDK directory you are in. If you use --terminal (on Windows) or --shell (on Linux and macOS) instead of the toolchain command name, the subcommand launches a new terminal or shell for the given toolchain environment.

For example, the following command launches a terminal on Linux with the environment for the toolchain v2.7.0 (and does not require the corresponding SDK to be installed):

nrfutil sdk-manager toolchain launch --ncs-version v2.7.0 --shell