You can inspect the toolchain environment variables using the env subcommand. This can be useful for debugging or for understanding the environment variables that are set when you use the launch subcommand.
The env subcommand uses the following pattern:
nrfutil sdk-manager toolchain env <--ncs-version <VERSION>|--toolchain-bundle-id <BUNDLE_ID>|--toolchain-path <PATH>>
In this subcommand pattern, you need to specify the toolchain environment you want to inspect using the one of three arguments (--ncs-version, --toolchain-bundle-id, or --toolchain-path)
For example, the following command shows the environment variables for the toolchain with the --ncs-version equal to v2.7.0:
nrfutil sdk-manager toolchain env --ncs-version v2.7.0
Example output
This command provides an output similar to the following, shortened for brevity not to provide user-specific paths:
PATH : C:\ncs\toolchains\ce3b5ff664;C:\ncs\toolchains\ce3b5ff664\mingw64\bin;C:\ncs\toolchains\ce3b5ff664\bin;C:\ncs\toolchains\ce3b5ff664\opt\bin;C:\ncs\toolchains\ce3b5ff664\opt\bin\Scripts;C:\ncs\toolchains\ce3b5ff664\opt\nanopb\generator-bin;C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\aarch64-zephyr-elf\bin;C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\x86_64-zephyr-elf\bin;C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\arm-zephyr-eabi\bin;C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\riscv64-zephyr-elf\bin; [...]
PYTHONPATH : C:\ncs\toolchains\ce3b5ff664\opt\bin;C:\ncs\toolchains\ce3b5ff664\opt\bin\Lib;C:\ncs\toolchains\ce3b5ff664\opt\bin\Lib\site-packages
ZEPHYR_SDK_INSTALL_DIR : C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk
ZEPHYR_TOOLCHAIN_VARIANT : zephyr
You can also use the --as-script flag to output a script that you can use to set the environment variables up for you (cmd, powershell (pwsh), or sh).