NCS installation Linux

Hi,

I've already spent a lot of time on this issue. I develop on a Windows laptop. I need to run unit tests with Twister before committing to our repository. I can't do this on Windows because native_sim is not supported. I tried to setup the ncs toolchain on WSL2/ubuntu 24.04 LTS. I found many different install instruction but i failed. i've also tried to use the docker-image used in the CI of ncs-sample-application, but could not get it to work locally. Could you please write in simple sentences, what I need in what order to setup ncs to run twister unit test on native_sim on WSL2/Ubuntu? We have a free-standing application.

gcc-arm-none-eabi (which version)? zephyr-sdk? ncs-sdk? nrfutil? jlink? its really confusing.

  • Hi, something is not working correctly with wsl and vs code nrf extension. i have a fresh Ubuntu 24.04 on WSL. I connect to remote via VS Code and install all extensions and 3.1.1 SDK and toolchain. When I create new application, it gets created but not opened. I see this error:

    2025-12-05 08:48:19.036 [error] Error: Unable to write file 'vscode-remote://wsl+ubuntu-24.04/home/.vscode/settings.json' (NoPermissions (FileSystemError): Error: EACCES: permission denied, mkdir '/home/.vscode')
  • I somehow made it work. However, flashing from the extension does not work with my workspace app (on windows):

    Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module> File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Lib\site-packages\west\app\main.py", line 1199, in main app.run(argv or sys.argv[1:]) File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Lib\site-packages\west\app\main.py", line 278, in run self.run_command(argv, early_args) File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Lib\site-packages\west\app\main.py", line 584, in run_command self.run_extension(args.command, argv) File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Lib\site-packages\west\app\main.py", line 739, in run_extension self.cmd.run(args, unknown, self.topdir, manifest=self.manifest, File "C:\ncs\toolchains\c1a76fddb2\opt\bin\Lib\site-packages\west\commands.py", line 200, in run self.do_run(args, unknown) File "C:\ncs-inter\zephyr\scripts\west_commands\flash.py", line 32, in do_run do_run_common(self, my_args, runner_args, domain_file=domains_file) File "c:\ncs-inter\zephyr\scripts/west_commands\run_common.py", line 241, in do_run_common for runner in runners_ext: TypeError: 'NoneType' object is not iterable

    I still have the impression, that workspace apps are not really well integrated with the extension, although you recommend it as project configuration.

  • Hi,

    I was asked to have a look at this case, since Runar is currently out-of-office.

    Ingfu said:
    I somehow made it work.

    Great!

    Ingfu said:
    However, flashing from the extension does not work with my workspace app (on windows)
    Ingfu said:
    I still have the impression, that workspace apps are not really well integrated with the extension, although you recommend it as project configuration.

    I have no intention to contradict you on that impression, but please note that running the extension from within WSL is not considered a target platform for us. There might be corner cases and/or unexpected behavior stemming from WSL which complicates things, and since we do not test the extension with a WSL setup this is not something we are able to monitor.

    Please also note that there are some caveats surrounding the use of workspaces, as well as a dual terminology in terms of VS Code workspace v.s. West workspace.For details, please see the section on Workspaces in the nRF Connect for VS Code documentation.

    Regards,
    Terje

Related