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

    The .zip file can be uploaded here on DevZone, by choosing Insert -> Image/Video/File, and then pressing the Upload button to upload a file from your computer. 

    If the .zip file is too large try to upload, try splitting it up into multiple files. A lot of these error messages you report seem to be error codes produced by VS code that can be ignored, and we are already working on improving the nRF Connect extension to not report many of these, as it more than anything causes a lot of confusion.

    Best regards,

    Simon

  • I try to add the files here.

    nRF_Connect_cap_1-6.zipnRF_Connect_cap_17-21.zip

    nRF_Studio_VSCode_1.JPG
    Initial errors
    
    nRF_Studio_VSCode_2.JPG
    Configuration errors
    
    nRF_Studio_VSCode_3.JPG
    Errors after Intellisense configuration
    
    About half the time, when you create a new application from an example, it asks if it can configure
    the Intellisense. When it configures, there "missing h-files" complaints mostly disappear,
    but it still shows errors. The SW, however, compiles.
    
    nRF_Studio_VSCode_4.JPG
    Intellisense configuration
    
    nRF_Studio_VSCode_5.JPG
    Board error and changes watcher notification
    
    nRF_Studio_VSCode_6.JPG
    Software still compiles, suggesting that the errors are false artefacts by the Visual Studio Code
    The problem is, if it doesn't compile, how to tell which errors are the real errors and which
    are false artefacts by Visual Studio Code / Intellisense.
    
    nRF_Studio_VSCode_7.JPG - nRF_Studio_VSCode_16.JPG
    Stuff left behind after uninstall - left out, listed in text form at the end of this file.
    
    nRF_Studio_VSCode_17.JPG
    Created application from an example. It offers 1.9.0, but I select 1.9.1
    (Where did it find the 1.9.0?)
    
    nRF_Studio_VSCode_18.JPG
    Extension conflict
    
    nRF_Studio_VSCode_19.JPG
    I clicked "Show conflicting extensions"
    
    nRF_Studio_VSCode_20.JPG
    After restarting the change watcher, it, again, suggests using c:\ncs\v1.9.0\zephyr.
    I clicked "Change" and selected v1.9.1
    Had to restart the change watcher, because touching the snipping tool made
    the notification disappear without selection.
    
    nRF_Studio_VSCode_21.JPG
    Then I restarted changes watcher again, and again it suggests 1.9.0 (right lower corner) even if
    only 1.9.1 is installed. (Where the heck did it find the old setting after all the cleanup?)
    
    ---------------
    
    Stuff left behind after uninstall
    
    ett15110@ETTRE253067 MINGW64 ~/.nrfconnect-apps
    $ ls -a
    ./                                pc-nrfconnect-linkmonitor.svg
    ../                               pc-nrfconnect-ppk.svg
    apps.json                         pc-nrfconnect-programmer.svg
    external/                         pc-nrfconnect-rssi.svg
    local/                            pc-nrfconnect-toolchain-manager.svg
    node_modules/                     pc-nrfconnect-tracecollector-preview.svg
    pc-nrfconnect-ble.svg             pc-nrfconnect-tracecollector.svg
    pc-nrfconnect-dtm.svg             updates.json
    pc-nrfconnect-gettingstarted.svg
    
    ett15110@ETTRE253067 MINGW64 ~/.vscode/extensions
    $ ls -a
    ./
    ../
    .obsolete
    austin.code-gnu-global-0.2.2/
    cschlosser.doxdocgen-1.4.0/
    marus25.cortex-debug-1.2.2/
    ms-vscode-remote.remote-containers-0.224.3/
    ms-vscode-remote.remote-ssh-0.76.1/
    ms-vscode-remote.remote-ssh-edit-0.76.1/
    ms-vscode-remote.remote-wsl-0.64.2/
    ms-vscode.cmake-tools-1.10.4/
    ms-vscode.cmake-tools-1.9.2/
    ms-vscode.cpptools-1.8.4/
    ms-vscode.cpptools-extension-pack-1.1.0/
    ms-vscode.cpptools-themes-1.0.0/
    nordic-semiconductor.nrf-connect-2022.3.104/
    nordic-semiconductor.nrf-devicetree-2022.3.68/
    nordic-semiconductor.nrf-kconfig-2022.1.78/
    nordic-semiconductor.nrf-terminal-2022.3.16/
    trond-snekvik.gnu-mapfiles-1.1.0/
    twxs.cmake-0.0.17/
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Local/nrfconnect-updater
    $ ls -a
    ./  ../  installer.exe*
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/nrfconnect
    $ ls -a
     ./                          Preferences
     ../                        'Session Storage'/
     .updaterId                  TransportSecurity
     Cache/                      blob_storage/
    'Code Cache'/                logs/
     Cookies                    'nRF Connect for Desktop'/
     Cookies-journal             pc-nrfconnect-launcher.json
     Dictionaries/               pc-nrfconnect-shared.json
     GPUCache/                   pc-nrfconnect-toolchain-manager/
    'Local Storage'/             pc-nrfconnect-toolchain-manager.json
    'Network Persistent State'   settings.json
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/CachedExtensionVSIXs
    $ ls -a
    ./
    ../
    austin.code-gnu-global-0.2.2
    cschlosser.doxdocgen-1.4.0
    jeff-hykin.better-cpp-syntax-1.15.13
    marus25.cortex-debug-1.2.2
    ms-vscode-remote.remote-containers-0.224.3
    ms-vscode-remote.remote-ssh-0.76.1
    ms-vscode-remote.remote-ssh-edit-0.76.1
    ms-vscode-remote.remote-wsl-0.64.2
    ms-vscode.cmake-tools-1.10.4
    ms-vscode.cmake-tools-1.9.2
    ms-vscode.cpptools-1.5.1
    ms-vscode.cpptools-1.8.4-win32-x64
    ms-vscode.cpptools-extension-pack-1.1.0
    ms-vscode.cpptools-themes-1.0.0
    nordic-semiconductor.nrf-connect-2022.3.104
    nordic-semiconductor.nrf-devicetree-2022.3.68
    nordic-semiconductor.nrf-kconfig-2022.1.78
    nordic-semiconductor.nrf-terminal-2022.3.16
    trond-snekvik.gnu-mapfiles-1.1.0
    twxs.cmake-0.0.17
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/Workspaces/1647582940206
    $ cat workspace.json
    {
            "folders": [
                    {
                            "name": "shell_bt_nus",
                            "path": "C:\\ncs_test\\shell_bt_nus"
                    }
            ]
    }
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/User
    $ cat settings.json
    {
        "nrf-connect.welcome.showOnStartup": true,
        "nrf-connect.topdir": "${nrf-connect.sdk:1.9.1}",
        "nrf-connect.toolchain.path": "${nrf-connect.toolchain:1.9.1}",
        "nrf-connect.enableTelemetry": false,
        "cmake.configureOnOpen": true
    }
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code
    $ cat storage.json
    {
        "telemetry.machineId": "9f43b368088c07bb0806bdaee446a8bcf15f6536b5a999a19a571b13c0c213d8",
        "theme": "vs-dark",
        "themeBackground": "#1e1e1e",
        "pickerWorkingDir": "C:\\ncs_test\\shell_bt_nus",
        "windowsState": {
            "lastActiveWindow": {
                "folder": "file:///c%3A/ncs_test/shell_bt_nus",
                "backupPath": "C:\\Users\\ett15110\\AppData\\Roaming\\Code\\Backups\\abfe5d0f9e442f578000ba79076f26d5",
                "uiState": {
                    "mode": 0,
                    "x": 448,
                    "y": 156,
                    "width": 1024,
                    "height": 768
                }
            },
            "openedWindows": []
        },
        "windowSplash": {
            "baseTheme": "vs-dark",
            "colorInfo": {
                "foreground": "#cccccc",
                "background": "#1e1e1e",
                "editorBackground": "#1e1e1e",
                "titleBarBackground": "#3c3c3c",
                "activityBarBackground": "#333333",
                "sideBarBackground": "#252526",
                "statusBarBackground": "#007acc",
                "statusBarNoFolderBackground": "#68217a"
            },
            "layoutInfo": {
                "sideBarSide": "left",
                "editorPartMinWidth": 220,
                "titleBarHeight": 30,
                "activityBarWidth": 48,
                "sideBarWidth": 300,
                "statusBarHeight": 22,
                "windowBorder": false
            }
        }
    }
    

Reply
  • I try to add the files here.

    nRF_Connect_cap_1-6.zipnRF_Connect_cap_17-21.zip

    nRF_Studio_VSCode_1.JPG
    Initial errors
    
    nRF_Studio_VSCode_2.JPG
    Configuration errors
    
    nRF_Studio_VSCode_3.JPG
    Errors after Intellisense configuration
    
    About half the time, when you create a new application from an example, it asks if it can configure
    the Intellisense. When it configures, there "missing h-files" complaints mostly disappear,
    but it still shows errors. The SW, however, compiles.
    
    nRF_Studio_VSCode_4.JPG
    Intellisense configuration
    
    nRF_Studio_VSCode_5.JPG
    Board error and changes watcher notification
    
    nRF_Studio_VSCode_6.JPG
    Software still compiles, suggesting that the errors are false artefacts by the Visual Studio Code
    The problem is, if it doesn't compile, how to tell which errors are the real errors and which
    are false artefacts by Visual Studio Code / Intellisense.
    
    nRF_Studio_VSCode_7.JPG - nRF_Studio_VSCode_16.JPG
    Stuff left behind after uninstall - left out, listed in text form at the end of this file.
    
    nRF_Studio_VSCode_17.JPG
    Created application from an example. It offers 1.9.0, but I select 1.9.1
    (Where did it find the 1.9.0?)
    
    nRF_Studio_VSCode_18.JPG
    Extension conflict
    
    nRF_Studio_VSCode_19.JPG
    I clicked "Show conflicting extensions"
    
    nRF_Studio_VSCode_20.JPG
    After restarting the change watcher, it, again, suggests using c:\ncs\v1.9.0\zephyr.
    I clicked "Change" and selected v1.9.1
    Had to restart the change watcher, because touching the snipping tool made
    the notification disappear without selection.
    
    nRF_Studio_VSCode_21.JPG
    Then I restarted changes watcher again, and again it suggests 1.9.0 (right lower corner) even if
    only 1.9.1 is installed. (Where the heck did it find the old setting after all the cleanup?)
    
    ---------------
    
    Stuff left behind after uninstall
    
    ett15110@ETTRE253067 MINGW64 ~/.nrfconnect-apps
    $ ls -a
    ./                                pc-nrfconnect-linkmonitor.svg
    ../                               pc-nrfconnect-ppk.svg
    apps.json                         pc-nrfconnect-programmer.svg
    external/                         pc-nrfconnect-rssi.svg
    local/                            pc-nrfconnect-toolchain-manager.svg
    node_modules/                     pc-nrfconnect-tracecollector-preview.svg
    pc-nrfconnect-ble.svg             pc-nrfconnect-tracecollector.svg
    pc-nrfconnect-dtm.svg             updates.json
    pc-nrfconnect-gettingstarted.svg
    
    ett15110@ETTRE253067 MINGW64 ~/.vscode/extensions
    $ ls -a
    ./
    ../
    .obsolete
    austin.code-gnu-global-0.2.2/
    cschlosser.doxdocgen-1.4.0/
    marus25.cortex-debug-1.2.2/
    ms-vscode-remote.remote-containers-0.224.3/
    ms-vscode-remote.remote-ssh-0.76.1/
    ms-vscode-remote.remote-ssh-edit-0.76.1/
    ms-vscode-remote.remote-wsl-0.64.2/
    ms-vscode.cmake-tools-1.10.4/
    ms-vscode.cmake-tools-1.9.2/
    ms-vscode.cpptools-1.8.4/
    ms-vscode.cpptools-extension-pack-1.1.0/
    ms-vscode.cpptools-themes-1.0.0/
    nordic-semiconductor.nrf-connect-2022.3.104/
    nordic-semiconductor.nrf-devicetree-2022.3.68/
    nordic-semiconductor.nrf-kconfig-2022.1.78/
    nordic-semiconductor.nrf-terminal-2022.3.16/
    trond-snekvik.gnu-mapfiles-1.1.0/
    twxs.cmake-0.0.17/
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Local/nrfconnect-updater
    $ ls -a
    ./  ../  installer.exe*
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/nrfconnect
    $ ls -a
     ./                          Preferences
     ../                        'Session Storage'/
     .updaterId                  TransportSecurity
     Cache/                      blob_storage/
    'Code Cache'/                logs/
     Cookies                    'nRF Connect for Desktop'/
     Cookies-journal             pc-nrfconnect-launcher.json
     Dictionaries/               pc-nrfconnect-shared.json
     GPUCache/                   pc-nrfconnect-toolchain-manager/
    'Local Storage'/             pc-nrfconnect-toolchain-manager.json
    'Network Persistent State'   settings.json
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/CachedExtensionVSIXs
    $ ls -a
    ./
    ../
    austin.code-gnu-global-0.2.2
    cschlosser.doxdocgen-1.4.0
    jeff-hykin.better-cpp-syntax-1.15.13
    marus25.cortex-debug-1.2.2
    ms-vscode-remote.remote-containers-0.224.3
    ms-vscode-remote.remote-ssh-0.76.1
    ms-vscode-remote.remote-ssh-edit-0.76.1
    ms-vscode-remote.remote-wsl-0.64.2
    ms-vscode.cmake-tools-1.10.4
    ms-vscode.cmake-tools-1.9.2
    ms-vscode.cpptools-1.5.1
    ms-vscode.cpptools-1.8.4-win32-x64
    ms-vscode.cpptools-extension-pack-1.1.0
    ms-vscode.cpptools-themes-1.0.0
    nordic-semiconductor.nrf-connect-2022.3.104
    nordic-semiconductor.nrf-devicetree-2022.3.68
    nordic-semiconductor.nrf-kconfig-2022.1.78
    nordic-semiconductor.nrf-terminal-2022.3.16
    trond-snekvik.gnu-mapfiles-1.1.0
    twxs.cmake-0.0.17
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/Workspaces/1647582940206
    $ cat workspace.json
    {
            "folders": [
                    {
                            "name": "shell_bt_nus",
                            "path": "C:\\ncs_test\\shell_bt_nus"
                    }
            ]
    }
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code/User
    $ cat settings.json
    {
        "nrf-connect.welcome.showOnStartup": true,
        "nrf-connect.topdir": "${nrf-connect.sdk:1.9.1}",
        "nrf-connect.toolchain.path": "${nrf-connect.toolchain:1.9.1}",
        "nrf-connect.enableTelemetry": false,
        "cmake.configureOnOpen": true
    }
    
    ett15110@ETTRE253067 MINGW64 ~/AppData/Roaming/Code
    $ cat storage.json
    {
        "telemetry.machineId": "9f43b368088c07bb0806bdaee446a8bcf15f6536b5a999a19a571b13c0c213d8",
        "theme": "vs-dark",
        "themeBackground": "#1e1e1e",
        "pickerWorkingDir": "C:\\ncs_test\\shell_bt_nus",
        "windowsState": {
            "lastActiveWindow": {
                "folder": "file:///c%3A/ncs_test/shell_bt_nus",
                "backupPath": "C:\\Users\\ett15110\\AppData\\Roaming\\Code\\Backups\\abfe5d0f9e442f578000ba79076f26d5",
                "uiState": {
                    "mode": 0,
                    "x": 448,
                    "y": 156,
                    "width": 1024,
                    "height": 768
                }
            },
            "openedWindows": []
        },
        "windowSplash": {
            "baseTheme": "vs-dark",
            "colorInfo": {
                "foreground": "#cccccc",
                "background": "#1e1e1e",
                "editorBackground": "#1e1e1e",
                "titleBarBackground": "#3c3c3c",
                "activityBarBackground": "#333333",
                "sideBarBackground": "#252526",
                "statusBarBackground": "#007acc",
                "statusBarNoFolderBackground": "#68217a"
            },
            "layoutInfo": {
                "sideBarSide": "left",
                "editorPartMinWidth": 220,
                "titleBarHeight": 30,
                "activityBarWidth": 48,
                "sideBarWidth": 300,
                "statusBarHeight": 22,
                "windowBorder": false
            }
        }
    }
    

Children
Related