Skip to content

cgnd/direnv-ncs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

direnv ❤️ nRF Connect SDK

When you cd into a nRF Connect SDK workspace directory, the correct NCS toolchain environment will be automatically sourced in your shell.

See https://www.hackster.io/cdwilson/automatically-activate-zephyr-build-environments-with-direnv-65af9c for more info.

Usage

  1. Install direnv on macOS or Linux.
  2. Install NCS toolchains using nrfutil, e.g.
    nrfutil sdk-manager toolchain install --ncs-version v3.1.0
    
  3. Copy this .envrc to the root of your NCS project workspace
  4. cd into the workspace dir (the first time, you'll need to run direnv allow)

If everything worked correctly, you should see output like the following:

direnv: loading ~/path/to/your/workspace/.envrc
direnv: export +GIT_EXEC_PATH +GIT_TEMPLATE_DIR +ZEPHYR_BASE +ZEPHYR_SDK_INSTALL_DIR +ZEPHYR_TOOLCHAIN_VARIANT ~PATH

About

direnv .envrc for NCS workspaces

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Languages