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.

  • A-ha. It also puts stuff in the user's home folder under .vscode/extensions and .nrfconnect-apps.

    Those are not cleaned by uninstall.

    I wonder where else...

    [edit]

    At least in %USERPROFILE%\AppData\Roaming\nrfconnect ...

    Under %USERPROFILE%\AppData\Roaming\nRF Connect (there are just logs).

    Something under %USERPROFILE%\AppData\Roaming\Code\Backups

  • Not good. It still doesn't configure the Visual Studio Code right.

    Tried two examples (blinky and shell_bt_nus). Neither had the file .vscode/c_cpp_properties.json, in shell_bt_nus-example, in the file .vscode/settings.json had "nrf-connect.application" left empty.

    Both examples compile and produce zephyr.elf, but in both cases Visual Studio Code complains that it can'f find the include files.

    Also, this keeps happening. (It doesn't seem to work at all.)

    File changes watcher stopped unexpectedly. A reload of the window may enable the watcher again unless the workspace cannot be watched for file changes.

  • When I manually created this file, the include files were found (by VSCode):

    .vscode/c_cpp_properties.json:
    {
        "configurations": [
            {
                "name": "Win32",
                "includePath": [
                    "${workspaceFolder}/**"
                ],
                "defines": [
                    "_DEBUG",
                    "UNICODE",
                    "_UNICODE"
                ],
                "windowsSdkVersion": "10.0.19041.0",
                "compilerPath": "C:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe",
                "cStandard": "${default}",
                "cppStandard": "${default}",
                "intelliSenseMode": "${default}",
                "compileCommands": "${workspaceFolder}/build/compile_commands.json"
            }
        ],
        "version": 4
    }

    For the blinky, the IDE asked for configuring the VSCode, but not for the shell_bt_nus.

    And even if shell_bt_nus compiles fine, the VSCode still gives these error messages:

    [{
        "resource": "/C:/Users/ett15110/Documents/Projects/xxx/test/shell_bt_nus/src/main.c",
        "owner": "C/C++",
        "code": "54",
        "severity": 8,
        "message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
        "source": "C/C++",
        "startLineNumber": 45,
        "startColumn": 2,
        "endLineNumber": 45,
        "endColumn": 9
    },{
        "resource": "/C:/Users/ett15110/Documents/Projects/xxx/test/shell_bt_nus/src/main.c",
        "owner": "C/C++",
        "code": "54",
        "severity": 8,
        "message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
        "source": "C/C++",
        "startLineNumber": 147,
        "startColumn": 2,
        "endLineNumber": 147,
        "endColumn": 9
    }]

  • It looks like the Visual Studio Code configuration doesn't work. VSCode gets configured wrong, and configurations are hidden in places where the uninstall doesn't find and remove them. After reinstall, the new setup still defaults to some stuff from some old installation, and refuses to update those defaults.

    Fortunately, Segger Embedded Studio seems to work.

  • Hi again

    It seems like you found the path to where nrfconnect stores various data at C:\Users\***\AppData\Roaming\nrfconnect. 

    Are you still seeing the same errors with the "old installation paths" after deleting the files "left" in \AppData\Roaming\nrfconnect ? I will report this internally so our devs can take a look at it. If you could show where these error messages are printed, maybe with a screenshot or just by explaining that would be great as well.

    Best regards,

    Simon

Related