This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Toolchain fails to install SDK v1.6.0

I am trying to install nRF Connect SDK v1.6.0. For some reason the download speed is extremely slow, and even fails without the ability to resume automatically. On two occasions Toolchain Manager v0.9.3 claimed it had successfully installed the SDK but I couldn't locate boards, projects, or even zephyr root folder in SEGGER, as if the download was incomplete. Is there a way I can manually download the necessary files and feed them to the Toolchain?

  • ibiglari said:
    Thanks for your reply. I don't use a VPN at the moment, and my A/V has not logged any events.

    Thanks a lot for the feedback, Iman. Could you run the command:

    ncsmgr init-ncs

    After that, a west update should be possible.

    Regards,

    Markus

  • Hi Markus,

    Thanks for your quick reply.

    Below is the output of 'ncsmgr init-ncs':

    NCS repositories are not yet cloned here. To do so run the following command:

    ncsmgr init-ncs

    me@My-Computer MINGW64 ~/ncs/v1.6.0
    $ ncsmgr init-ncs
    Checking out NCS v1.6.0 ...FATAL ERROR: already initialized in C:\Users\( , )_( , )\ncs\v1.6.0, aborting.
    Note:
        In your environment, ZEPHYR_BASE is set to:
        C:/Users/( , )_( , )/ncs/v1.6.0/zephyr

        This forces west to search for a workspace there.
        Try unsetting ZEPHYR_BASE and re-running this command.
    HEAD is now at 7a076c22d VERSION: 1.6.0
    /C/Users/( , )_( , )/ncs/v1.6.0
    done
    Updating repos ...
    Traceback (most recent call last):
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 172, in _mpath
        path = cp.get('manifest', 'path')
      File "configparser.py", line 781, in get
      File "configparser.py", line 1149, in _unify_values
    configparser.NoSectionError: No section: 'manifest'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "runpy.py", line 193, in _run_module_as_main
      File "runpy.py", line 86, in _run_code
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 779, in main
        app.run(argv or sys.argv[1:])
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 106, in run
        self.run_command(argv)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 336, in run_command
        cmd.run(args, unknown, self.topdir, manifest=self.manifest)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\commands.py", line 132, in run
        self.do_run(args, unknown)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 806, in do_run
        self.update_all()
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 860, in update_all
        self.manifest = Manifest.from_file(
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 1103, in from_file
        (mpath, mname) = _mpath(topdir=topdir)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 177, in _mpath
        raise MalformedConfig('no "manifest.path" config option is set') from e
    west.manifest.MalformedConfig: no "manifest.path" config option is set
    done
    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
    west: error: argument <command>: invalid choice: 'zephyr-export' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

    me@My-Computer MINGW64 ~/ncs/v1.6.0
    $ unset ZEPHYR_BASE && ncsmgr init-ncs
    Checking out NCS v1.6.0 ...FATAL ERROR: already initialized in C:\Users\( , )_( , )\ncs\v1.6.0, aborting.
    HEAD is now at 7a076c22d VERSION: 1.6.0
    /C/Users/( , )_( , )/ncs/v1.6.0
    done
    Updating repos ...
    Traceback (most recent call last):
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 172, in _mpath
        path = cp.get('manifest', 'path')
      File "configparser.py", line 781, in get
      File "configparser.py", line 1149, in _unify_values
    configparser.NoSectionError: No section: 'manifest'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "runpy.py", line 193, in _run_module_as_main
      File "runpy.py", line 86, in _run_code
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 779, in main
        app.run(argv or sys.argv[1:])
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 106, in run
        self.run_command(argv)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 336, in run_command
        cmd.run(args, unknown, self.topdir, manifest=self.manifest)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\commands.py", line 132, in run
        self.do_run(args, unknown)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 806, in do_run
        self.update_all()
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 860, in update_all
        self.manifest = Manifest.from_file(
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 1103, in from_file
        (mpath, mname) = _mpath(topdir=topdir)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 177, in _mpath
        raise MalformedConfig('no "manifest.path" config option is set') from e
    west.manifest.MalformedConfig: no "manifest.path" config option is set
    done
    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
    west: error: argument <command>: invalid choice: 'zephyr-export' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

    me@My-Computer MINGW64 ~/ncs/v1.6.0
    $

  • Thanks for the immediate feedback, Iman!

    Honestly, I wouldn’t have expected this behaviour so I’m a little bit surprised myself. But let’s try the following:

    • Backup the file in ../ncs/downloads/ncs-toolchain-v1.6.0-20210701-de414c8.zip
    • Remove the current installation of NCS v1.6.0 (down-arrow button in Toolchain Manager --> Remove)
    • When uninstalled successfully, close the Toolchain Manager and nRF Connect
    • Unzip ncs-toolchain-v1.6.0-20210701-de414c8.zip to ..ncs/v1.6.0/toolchain
    • Re-open nRF Connect and the Toolchain Manager. You should now be able to see the “First steps to build” button again
    • Open the bash and do as shown below. This should trigger the repository initialisation and run ‘west update’ automatically (I'm very sorry for the 'west init' confusion earlier!)

    NCS repositories are not yet cloned here. To do so run the following command:
    
    ncsmgr init-ncs
    
    user@LAPTOP-K3KIGSKJ MINGW64 ~/ncs/v1.6.0
    $ echo $ZEPHYR_BASE
    C:/Users/user/ncs/v1.6.0/zephyr
    
    user@LAPTOP-K3KIGSKJ MINGW64 ~/ncs/v1.6.0
    $ ncsmgr init-ncs
    Checking out NCS v1.6.0 ...=== Initializing in C:\Users\user\ncs\v1.6.0
    --- Cloning manifest repository from https://github.com/nrfconnect/sdk-nrf, rev. v1.6.0
    Initialized empty Git repository in C:/Users/user/ncs/v1.6.0/.west/manifest-tmp/.git/
    remote: Enumerating objects: 73395, done.
    remote: Counting objects: 100% (492/492), done.
    remote: Compressing objects: 100% (282/282), done.
    remote: Total 73395 (delta 251), reused 350 (delta 203), pack-reused 72903
    Receiving objects: 100% (73395/73395), 37.19 MiB | 984.00 KiB/s, done.
    Resolving deltas: 100% (53264/53264), done.
    
    …
    
    Resolving deltas: 100% (202/202), done.
    From https://github.com/zephyrproject-rtos/edtt
     * [new branch]      le-audio      -> refs/west/le-audio
     * [new branch]      public_master -> refs/west/public_master
    HEAD is now at 7dd56fc Add FIXME note to handle incorrect LL/CON/MAS/BV-27-C implementation
    HEAD is now at 7dd56fc Add FIXME note to handle incorrect LL/CON/MAS/BV-27-C implementation
    done
    Zephyr (C:/Users/user/ncs/v1.6.0/zephyr/share/zephyr-package/cmake)
    has been added to the user package registry in:
    HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr
    
    ZephyrUnittest (C:/Users/user/ncs/v1.6.0/zephyr/share/zephyrunittest-package/cmake)
    has been added to the user package registry in:
    HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\ZephyrUnittest
    
    
    user@LAPTOP-K3KIGSKJ MINGW64 ~/ncs/v1.6.0
    $

    Regards,

    Markus

  • Hi Markus,

    Thanks for your reply. This did the trick!

    I think I also found what the original problem was... First time I ran 'ncsmgr init-ncs', it failed after pulling repositories to 'ncs/v1.6.0/.west/manifest-tmp/.git/'. Looking at the logs, I realized it has failed to move'.west/manifest-tmp' to 'nrf':

    .
    .
    .
     * [new tag]             v1.6.0            -> v1.6.0
     * [new tag]             v1.6.0-rc1        -> v1.6.0-rc1
     * [new tag]             v1.6.0-rc2        -> v1.6.0-rc2
     * [new tag]             v1.6.0-rc3        -> v1.6.0-rc3
    1b091a830bf319f8472b7ddbbca443300c2c6478 refs/tags/v1.6.0
    Updating files: 100% (4279/4279), done.
    Note: switching to 'v1.6.0'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

    Turn off this advice by setting config variable advice.detachedHead to false

    HEAD is now at 7a076c22d VERSION: 1.6.0
    Traceback (most recent call last):
      File "shutil.py", line 788, in move
    PermissionError: [WinError 5] Access is denied: 'C:\\Users\\( , )_( , )\\ncs\\v1.6.0\\.west\\manifest-tmp' -> 'C:\\Users\\( , )_( , )\\ncs\\v1.6.0\\nrf'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "runpy.py", line 193, in _run_module_as_main
      File "runpy.py", line 86, in _run_code
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 779, in main
        app.run(argv or sys.argv[1:])
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 106, in run
        self.run_command(argv)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 336, in run_command
        cmd.run(args, unknown, self.topdir, manifest=self.manifest)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\commands.py", line 132, in run
        self.do_run(args, unknown)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 198, in do_run
        topdir = self.bootstrap(args)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 295, in bootstrap
        shutil.move(os.fspath(tempdir), os.fspath(manifest_abspath))
      File "shutil.py", line 800, in move
      File "shutil.py", line 737, in rmtree
      File "shutil.py", line 610, in _rmtree_unsafe
      File "shutil.py", line 610, in _rmtree_unsafe
      File "shutil.py", line 610, in _rmtree_unsafe
      File "shutil.py", line 615, in _rmtree_unsafe
      File "shutil.py", line 613, in _rmtree_unsafe
    PermissionError: [WinError 5] Access is denied: 'C:\\Users\\( , )_( , )\\ncs\\v1.6.0\\.west\\manifest-tmp\\.git\\objects\\pack\\pack-4a806be0d26bb3ed8245b13c4bf7b8dd4608981c.idx'
    HEAD is now at 7a076c22d VERSION: 1.6.0
    /C/Users/( , )_( , )/ncs/v1.6.0
    done
    Updating repos ...
    Traceback (most recent call last):
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 172, in _mpath
        path = cp.get('manifest', 'path')
      File "configparser.py", line 781, in get
      File "configparser.py", line 1149, in _unify_values
    configparser.NoSectionError: No section: 'manifest'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "runpy.py", line 193, in _run_module_as_main
      File "runpy.py", line 86, in _run_code
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 779, in main
        app.run(argv or sys.argv[1:])
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 106, in run
        self.run_command(argv)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 336, in run_command
        cmd.run(args, unknown, self.topdir, manifest=self.manifest)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\commands.py", line 132, in run
        self.do_run(args, unknown)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 806, in do_run
        self.update_all()
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\project.py", line 860, in update_all
        self.manifest = Manifest.from_file(
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 1103, in from_file
        (mpath, mname) = _mpath(topdir=topdir)
      File "C:\Users\( , )_( , )\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 177, in _mpath
        raise MalformedConfig('no "manifest.path" config option is set') from e
    west.manifest.MalformedConfig: no "manifest.path" config option is set
    done
    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
    west: error: argument <command>: invalid choice: 'zephyr-export' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

    $

    Took me a while but I eventually found it my antivirus was checking the files in '.west/manifest-tmp'. This would prevent the folder to be moved until the scan operation was complete. In reality, this would probably take a fraction of a second but was conflicting with the script's operation. It might make life easier for everyone if you introduce a short delay before that operation in your script.

  • Thanks a lot for your feedback, Iman! I’m glad to hear that you could resolve the issue :-)

    ibiglari said:
    Took me a while but I eventually found it my antivirus was checking the files in '.west/manifest-tmp'. This would prevent the folder to be moved until the scan operation was complete. In reality, this would probably take a fraction of a second but was conflicting with the script's operation. It might make life easier for everyone if you introduce a short delay before that operation in your script.

    I will feedback this to our development team. Thanks for the input!

    Cheers,

    Markus

Related