This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Re-installing nRF Connect SDK

How do I remove nRF Connect SDK from Windows before re-installing?

And are there something that needs to be done, if you have used cmake and Visual Studio Code for other projects?

I installed the tools via nRF Connect Desktop / Toolchain Manager in a project directory, but it looked like the paths got too long. Then I uninstalled the stuff via nRF Connect Desktop / Toolchain Manager, uninstalled the nRF Connect Desktop, removed the stuff from the project directory and rebooted. Then I re-installed everything at C:/ncs, but when I try to do something, it still defaults to the deleted project directory.

Also, when I tried (after re-install) to create the shell_bt_nus from an example and into another folder, I got the ELF-files (ARM code), but the Visual Studio Code shows errors:

[{
    "resource": "/C:/Users/ett15110/Documents/Projects/xxxy/test/shell_bt_nus/src/main.c",
    "owner": "C/C++",
    "code": "1696",
    "severity": 8,
    "message": "cannot open source file \"alloca.h\" (dependency of \"logging/log.h\")",
    "source": "C/C++",
    "startLineNumber": 17,
    "startColumn": 1,
    "endLineNumber": 17,
    "endColumn": 25
},{
    "resource": "/C:/Users/ett15110/Documents/Projects/xxx/test/shell_bt_nus/src/main.c",
    "owner": "C/C++",
    "code": "1696",
    "severity": 8,
    "message": "cannot open source file \"alloca.h\" (dependency of \"zephyr.h\")",
    "source": "C/C++",
    "startLineNumber": 11,
    "startColumn": 1,
    "endLineNumber": 11,
    "endColumn": 20
},{
    "resource": "/C:/Users/ett15110/Documents/Projects/xxx/test/shell_bt_nus/src/main.c",
    "owner": "C/C++",
    "code": "1696",
    "severity": 8,
    "message": "#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (C:\\Users\\ett15110\\Documents\\Projects\\xxx\\test\\shell_bt_nus\\src\\main.c).",
    "source": "C/C++",
    "startLineNumber": 11,
    "startColumn": 1,
    "endLineNumber": 11,
    "endColumn": 20
}]

The first two seems to happen, because __GNUC__ seems to not been defined.

And in the target folder it generated .vscode-file with this content:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json",
            "configurationProvider": "nrf-connect"
        }
    ],
    "version": 4
}

I don't think it should use that compiler for anything.

It also found some errors from code for other HW!

Is there a way to "make clean"? I didn't find any.

Parents
  • Hi again

    The files you have listed in text:

    In .nrfconnect-apps/ this only seems to be data from the nRF Connect for Desktop apps, so these aren't related to the nRF Connect SDK Toolchain manager. The /nrfconnect-updater/ includes files for the nRFConnect for Desktop application itself, like the installer and probably uninstaller. Same goes for /Roaming/nrfconnect/.

    The files in /.vscode/extensions/ are extensions installed by Visual Studio code, and are not managed by the toolchain manager either. Same goes for the CachedExtensionVSIXs and workspace folders you've added. These are not affected by the toolchain manager.

    Regarding the error codes from your screenshots, these seem for the most part okay to ignore. The way you'll see that something is wrong while compiling/building you'll get an error message in the terminal where the building is done, and it should refer to what problems in the "Problems" tab to look at.

    Best regards,

    Simon

  • I guess, the nRF Connect for Desktop configures the nRF Connect SDK Toolchain manager wrong?

    And some Nordic SW somewhere generated those Visual Studio Code configurations.

    And after cleaning up all the stuff listed, the nRF Connect to VS Code finds (and keeps offering) the old nRF Connect SDK version (and some other old settings as well).

    I think that means, that the install/uninstall doesn't quite work. And since you are encouraged to use nRF Connect for Desktop for installing the environment, I think that makes the nRF Connect Desktop, nRF Connect SDK Toolchain manager and nRF Connect SDK sort of bundled. A new user (probably), like me, can't really make a difference about which installer/SDK is responsible of what.

    Anyway, I guess, I just need to ignore all errors shown by the VS Code and just look at the error in the compilation terminal window, or use SES.

    (And the file changes watcher still keeps crashing.)

Reply
  • I guess, the nRF Connect for Desktop configures the nRF Connect SDK Toolchain manager wrong?

    And some Nordic SW somewhere generated those Visual Studio Code configurations.

    And after cleaning up all the stuff listed, the nRF Connect to VS Code finds (and keeps offering) the old nRF Connect SDK version (and some other old settings as well).

    I think that means, that the install/uninstall doesn't quite work. And since you are encouraged to use nRF Connect for Desktop for installing the environment, I think that makes the nRF Connect Desktop, nRF Connect SDK Toolchain manager and nRF Connect SDK sort of bundled. A new user (probably), like me, can't really make a difference about which installer/SDK is responsible of what.

    Anyway, I guess, I just need to ignore all errors shown by the VS Code and just look at the error in the compilation terminal window, or use SES.

    (And the file changes watcher still keeps crashing.)

Children
  • I just wonder...

    Is there a way to get he VS Code version to work properly? I don't seem to be able to clean my systen to be able to do clean (re-)install.

    And I wonder if the fact that I have other development environments installed too, that use the VS Code in a different way, somehow messes with the nRF Connect SDK VS Code settings?

  • Hi

    Yes, that should be possible, I have both SEGGER and Keil µVision and I'm able to get VS code up and running. There is an issue with the "Problems" tab that we're looking into, but you should be able to build and flash sample projects anyway. 

    If a new install of the nRF Connect SDK for VS code is not working for me, it usually fixes the issue to just uninstall the SDK from the Toolchain manager and reinstalling it (I personally have used the same path all along), but changing it should be okay too. Is the compiling, building and flashing of projects not working properly on your end?

    Best regards,

    Simon

  • It works (compiles and generates the elf and hex files), but not properly.

    The main issues:

    - wrong C code parser the VS Code (Intellisense?) uses (being studied, I understood - the problems tab)

    - configuration defaults from previous installs (wrong SDK version, etc.)

    - changes watcher crashing (if I restart it, it checks the changes OK, and crashes after that)

    - the Intellisense configuration (c_cpp_properties.json) seldom gets generated.

    The changes watcher wakes up all kinds of configurations. If you add a file, the IDE won't notice, and doesn't run cmake, unless you restart the changes watcher (which crashes after that).

    I don't have a board yet, so that's how far I have been able to try.

Related