Updating tools and repositories

After you install the nRF Connect SDK, regularly check for updates to tools and repositories. The west tool is updated regularly, like any other required Python dependency package.

You might also want to switch to a newer release or check out the latest state of development. However, if you work with a specific release of the nRF Connect SDK, you do not need to update your repositories, because the release will not change. For an overview of changes in the latest releases, see Release notes.

Updating nRF Connect for Visual Studio Code

Visual Studio Code checks for extension updates and automatically installs them when they are available. After an extension is updated, VS Code prompts you to reload the application.

If you disabled automatic updates:

  1. Open the Extensions tab and locate the nRF Connect for Visual Studio Code extension.

  2. The Update button appears when an update is available. Click on the button to install the update.

The nRF Connect for Visual Studio Code extension lets you update west and the associated nRF Connect SDK repositories within its Source Control panel. For detailed instructions, see the West integration section of the extension’s documentation.

Updating west

To update west, run the following command in the command window:

pip3 install -U west

This command updates west to the latest available version in the PyPi repository.

Updating the repositories

To manage the nrf repository (the manifest repository), use Git. To make sure that you have the latest changes, run git fetch origin to fetch the latest code from the sdk-nrf repository. Checking out a branch or tag in the nrf repository gives you a different version of the manifest file. Running west update updates the project repositories to the state specified in this manifest file.

Note

If you get an error message when running west, update west to the latest version. See Troubleshooting West if you need more information.

Examples of commands

To switch to release v1.9.2 of the nRF Connect SDK, enter the following commands in the ncs/nrf directory:

git fetch origin
git checkout v1.9.2
west update

To update to a particular revision (SHA), make sure that you have that particular revision locally before you check it out (by running git fetch origin):

git fetch origin
git checkout 224bee9055d986fe2677149b8cbda0ff10650a6e
west update

To switch to the latest state of development, enter the following commands:

git fetch origin
git checkout origin/main
west update

Note

Run west update every time you change or modify the current working branch (for example, when you pull, rebase, or check out a different branch). This will bring the project repositories to the matching revision defined by the manifest file.

Updating SEGGER Embedded Studio Nordic Edition

Each new release of the nRF Connect SDK might require manually updating to a newer version of the SEGGER Embedded Studio (SES) Nordic Edition. Whenever you update to a newer release of the nRF Connect SDK, check the Requirements page for the given release to see if you are using the minimum required version of the SES Nordic Edition.

Note

Because of the custom nRF Connect SDK options available only in the SES Nordic Edition, notifications about newer versions of SES are disabled in the SES Nordic Edition.

To update to the latest version of the SES Nordic Edition, use one of the following options:

Then, set up the build environment in SES again.

Updating SES packages

Updating SES Nordic Edition will not update already installed packages. You might need to manually update the CPU support package when you cannot select a CPU as Target Processor when configuring a new project.

To update the nRF CPU Support Package after a SES update:

  1. In SES, select Tools > Package Manager….

  2. Search for “nRF CPU Support Package”.

  3. Update the package to the latest version.

Pointing the repositories to the right remotes after they were moved

Before the nRF Connect SDK version 1.3.0, the Git repositories were moved from the NordicPlayground GitHub organization to the nrfconnect organization. They were also renamed, replacing the fw-nrfconnect- prefix with sdk-.

The full list of repositories with their old and new URLs is in the following table:

Old URL

New URL

File system path

https://github.com/NordicPlayground/fw-nrfconnect-nrf

https://github.com/nrfconnect/sdk-nrf

ncs/nrf

https://github.com/NordicPlayground/fw-nrfconnect-zephyr

https://github.com/nrfconnect/sdk-zephyr

ncs/zephyr

https://github.com/NordicPlayground/fw-nrfconnect-mcuboot

https://github.com/nrfconnect/sdk-mcuboot

ncs/bootloader/mcuboot

https://github.com/NordicPlayground/fw-nrfconnect-mcumgr

https://github.com/nrfconnect/sdk-mcumgr

ncs/modules/lib/mcumgr

https://github.com/NordicPlayground/nrfxlib

https://github.com/nrfconnect/sdk-nrfxlib

ncs/nrfxlib

If you cloned the repositories before the move, your local repositories and forks of the nRF Connect SDK repositories are automatically be redirected to the new ones. However, you should point them directly to their new locations as described in this section.

To change the remotes, complete the following steps:

  1. Rename any personal forks that you have of the nRF Connect SDK repositories to their new names:

    1. Visit your personal fork in a browser. For example, to rename the fw-nrfconnect-nrf repository, access your fork on GitHub (https://github.com/<username>/fw-nrfconnect-nrf, where <username> is your GitHub account name).

    2. Switch to the Settings tab and edit the name in the Repository name field to sdk-nrf.

  2. Rename the remotes:

    1. Go to your local copy of each of the repositories listed in the preceding table.

    2. Enter the following command:

      git remote set-url remote_name new_url

      In this command, replace remote_name with the name of your remote (for example, origin for your fork or ncs for the upstream repository) and new_url with the URL of your fork or the new URL from the preceding table. If you are not sure about the remotes that are configured in your local repository, enter git remote -v to see your remotes.

For example, to point your existing fw-nrfconnect-nrf clone to its new URL, enter the following command:

cd ncs/nrf
git remote set-url origin https://github.com/nrfconnect/sdk-nrf

Similarly, to point your existing fw-nrfconnect-zephyr clone to the new URL, enter the following command:

cd  ncs/zephyr
git remote set-url ncs https://github.com/nrfconnect/sdk-zephyr

For more information about remotes and how to handle them, see Forking a repository of the nRF Connect SDK.