How to FULLY UNINSTALL nRF Connect SDK and SES on macOS?

Kind folks,

Automated tools like the nRF Connect SDK environment are wonderful when they work, but can be a Procrustean bed when they break or don't fit the exact requirements.  Case in point: I've gone through installing and reinstalling nRF Connect SDK, SES and the VS extension at least half a dozen time in various combinations of automated and manual procedures.  The goal was to merge two sample apps: nrf_dm from the new Nordic v1.9.1 SDK and the nrf_matrix_led example from within the zephyr repo and run the resulting app on a BBC Micro:Bit V2 (an nRF52833-based SBC).  This involved many Kconfig and Device Tree issues.  You can read about some of the details of my journey in an earlier ticket.

Suffice it to say that I've made multiple attempts to uninstall all of the related software, make sure I have cleared away any remnants, and reinstall nRF Connect, and SES (leaving VS code out of the discussion for the moment) all of this running on the absolutely latest macOS Monterey 12.3.  I have failed in this endeavor several times.  Multiple pieces of "trash" (prior state) seem to remain.  For example, when a freshly installed SES is started by clicking on the Open SES, the SES app opens, showing a dashboard which shows a list of recent project (not a blank list).  Then either upon executing the File | Open nRF Connect Project... command, or automatically without any user interaction, the new nRF Project dialog pops up with a covering error message:

Closing the error message leaves an unresponsive options pane.

So, clearly there's some remembered state from prior installs that's preventing a new installation from being done cleanly.  Searching for uninstall instructions for nRF Connect SDK yielded no useful information.  Even searching for uninstallation instructions for SES yields only one suggestion, which proved to be insufficient and didn't erase prior project history. Therefore, I request:

  1. An uninstaller tool for nRF Connect, its plugins (e.g., tool manager), any "embedded" SES IDE inside it's tool collection, and any other remnants of nRF Connect, or
  2. At least a list of files and directories that need to be deleted to effect a complete uninstallation, and
  3. Probably too much to ask for at the current moment, but it sure would be useful to have a description of the process by which "New nRF Connect Project..." does its work inside SES (including critical script files, locations, etc.)

Thanks for any advice.  I am truly stuck and unable to proceed otherwise.

Parents
  • Hi, Øyvind,

    I'll try to respond directly to your questions.

    Here's the support info generated by the nRF Connect plugin in VSCode:

    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.
    
    For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64",
        "osKernel": "21.4.0",
        "vscode": "1.65.2",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2022-03-18T04:44:28.975Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:01:15",
        "osUptime": "31:13:56",
        "cpu": {
          "model": "Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz",
          "speed": "2700 MHz",
          "count": 4
        },
        "memory": {
          "total": "8.00 GB",
          "free": "0.02 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1647316357859",
        "folders": [
          "/opt/nordic/ncs/v1.9.1/nrf/samples/bluetooth/nrf_dm",
          "/Volumes/Archive2/foo/nrf_led_matrix"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2022.3.104",
            "path": "/Users/mike/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.3.104",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2022.3.16",
            "path": "/Users/mike/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.3.16",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "1.2.2",
          "ms-vscode.cpptools": "1.8.4",
          "ms-vscode.js-debug": "1.65.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.85",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "/Applications/SEGGER/JLink/JLinkExe": "7.62a",
        "/usr/local/bin/nrfjprog": "10.15.3",
        "nrfutil": "Not found",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/cmake": "3.21.1",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/west": "0.12.0",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/python3": "3.9.6",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/gperf": "3.1",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/gn": "1977",
        "/opt/nordic/ncs/v1.9.1/toolchain/bin/git": "2.32.0"
      },
      "sdks": [
        {
          "version": "1.9.1",
          "path": "/Users/mike/ncs"
        },
        {
          "version": "Zephyr 3.0.99",
          "path": "/Users/mike/zephyrproject"
        },
        {
          "version": "1.9.1",
          "path": "/opt/nordic/ncs/v1.9.1"
        }
      ],
      "toolchains": [
        {
          "version": "1.9.1",
          "path": "/opt/nordic/ncs/v1.9.1/toolchain"
        }
      ],
      "connectedDevices": [],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.9.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.9.1}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}",
            "/Volumes/Archive2/foo/nrf_led_matrix"
          ],
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          },
          "python": "",
          "liveValue": true
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "objdumpPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null,
          "showDevDebugOutput": "none"
        }
      },
      "environment": {
        "westExe": "/opt/nordic/ncs/v1.9.1/toolchain/bin/west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.9.1/toolchain/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/mike",
          "PATH": "/opt/nordic/ncs/v1.9.1/toolchain/bin:/Users/mike/.asdf/shims:/usr/local/Cellar/asdf/0.9.0/libexec/bin:/usr/local/sbin:/usr/local/opt/ccache/libexec:/Users/mike/Projects/moddable/build/bin/mac/release:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/mike/gn",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v1.9.1/zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.9.1/toolchain",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "mike"
        },
        "toolchainPath": "/opt/nordic/ncs/v1.9.1/toolchain",
        "toolchainBinPath": "/opt/nordic/ncs/v1.9.1/toolchain/bin",
        "toolchainVersion": "1.9.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    
    

    There are a couple curious items in this output.  I'll note them below.

    I have automatically installed, removed and repeated this sequence several times with SDK v1.9.1.  The resulting Toolchain Manager window below shows that the final configuration Is broken in at least one way -- the Open SES button is missing.

    Here's the directory structure for the installed SDK.  Appears correct at this level of detail:

    I don't believe I've done a recent manual installation of the SDK.  I did however do a separate manual installation of the Zephyr system in order to create a testbed for working out some of my device tree and Kconfig issues without nRF SDK complications.  That installation seems to work OK, and have the recommended directory structure.

    As an additional, possibly useful bit of information, here are the environment variables that are defined when I "Open Terminal" from with Toolchain Mgr (and I presume are active when I start SES from there as well).

    Last login: Thu Mar 17 22:30:21 on ttys000
    cd /opt/nordic/ncs/v1.9.1 ; export PATH=/opt/nordic/ncs/v1.9.1/toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ; export GIT_EXEC_PATH=/opt/nordic/ncs/v1.9.1/toolchain/Cellar/git/2.32.0_1/libexec/git-core ; export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ; export GNUARMEMB_TOOLCHAIN_PATH=/opt/nordic/ncs/v1.9.1/toolchain ; clear
    mike@Mikes-MBP-101 ~ % cd /opt/nordic/ncs/v1.9.1 ; export PATH=/opt/nordic/ncs/v1.9.1/toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ; export GIT_EXEC_PATH=/opt/nordic/ncs/v1.9.1/toolchain/Cellar/git/2.32.0_1/libexec/git-core ; export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ; export GNUARMEMB_TOOLCHAIN_PATH=/opt/nordic/ncs/v1.9.1/toolchain ; clear
    
    
    mike@Mikes-MBP-101 v1.9.1 % printenv
    TERM_SESSION_ID=A80CBA4F-62CD-47AB-B1F1-B2E6B6C76F43
    __CFBundleIdentifier=com.apple.Terminal
    TMPDIR=/var/folders/hp/_vddx6wx4ws6n5wsbb8793l80000gn/T/
    XPC_FLAGS=0x0
    TERM=xterm-256color
    SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.J2qSN75xT9/Listeners
    XPC_SERVICE_NAME=0
    TERM_PROGRAM=Apple_Terminal
    TERM_PROGRAM_VERSION=444
    SHLVL=2
    PWD=/opt/nordic/ncs/v1.9.1
    ORIGINAL_XDG_CURRENT_DESKTOP=undefined
    SHELL=/bin/zsh
    HOME=/Users/mike
    LOGNAME=mike
    USER=mike
    PATH=/opt/nordic/ncs/v1.9.1/toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    OLDPWD=/Users/mike
    ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    GNUARMEMB_TOOLCHAIN_PATH=/opt/nordic/ncs/v1.9.1/toolchain
    ZPROFILETEST=was run
    MODDABLE=/Users/mike/Projects/moddable
    IDF_PYTHON_ENV_PATH=/Users/mike/.espressif/python_env/idf4.4_py3.10_env
    PIP_REQUIRE_VIRTUALENV=false
    ASDF_DIR=/usr/local/Cellar/asdf/0.9.0/libexec
    ZSHRCTEST=was run
    GIT_EXEC_PATH=/opt/nordic/ncs/v1.9.1/toolchain/Cellar/git/2.32.0_1/libexec/git-core
    LANG=en_US.UTF-8
    _=/usr/bin/printenv
    mike@Mikes-MBP-101 v1.9.1 %
    

    You said: "It should also be sufficient to delete the folder where you installed the environment."  Not in my experience After removing and reinstalling the SDK, old project info still persists in SES.

    Hope all this info helps,

    Mike

  • Hi Mike,
    Thanks for sharing these details.

    Mike Wirth said:
    Not in my experience After removing and reinstalling the SDK, old project info still persists in SES.

    First of all, this is a known issue with SES. But what version of SES are you opening, the one that follows Toolchain Manager or a manually installed? I'm not sure what you mean with list of recent projects. The Open nRF Connect Project dialog will list available projects in the nRF Connect SDK folder. This will be samples found under both nrf/samples and zephyr/samples, and you can narrow these down with the different checkboxes. 

    Are you able to see nRF Connect SDK Release and Toolchain versions? Make sure that the Segger Embedded Studio actually points to correct nRF Connect SDK folder. You can check this under Tools --> Options --> nRF Connect --> Directories.

    From the support information you provided, I can see that you have the following SDK versions:

      "sdks": [
        {
          "version": "1.9.1",
          "path": "/Users/mike/ncs"
        },
        {
          "version": "Zephyr 3.0.99",
          "path": "/Users/mike/zephyrproject"
        },
        {
          "version": "1.9.1",
          "path": "/opt/nordic/ncs/v1.9.1"
        }

    If your SES is pointing to /opt/nordic/ncs/v1.9.1 will it still give the script error /syntax error?

    Mike Wirth said:
    The resulting Toolchain Manager window below shows that the final configuration Is broken in at least one way -- the Open SES button is missing.

    I had similar issues when trying to download the SDK via VPN or LTE connection. Are you downloading on a corporate network or using a corporate computer? The solution that worked for me was to use a standard WiFi connection at home or similar (non-restricted connection) to download.

    Mike Wirth said:
    I don't believe I've done a recent manual installation of the SDK.  I did however do a separate manual installation of the Zephyr system in order to create a testbed for working out some of my device tree and Kconfig issues without nRF SDK complications.  That installation seems to work OK, and have the recommended directory structure.

    There are 3 installations. Make sure to use the correct one in e.g. VS Code and SES, i.e. /opt/nordic/ncs/v1.9.1/

    Mike Wirth said:
    As an additional, possibly useful bit of information, here are the environment variables that are defined when I "Open Terminal" from with Toolchain Mgr (and I presume are active when I start SES from there as well).

    Yes, this looks correct as per my last comment above. When opening SES from the Toolchain Manager (as long as you actually have the Open SES button) it should inherit the same settings.

    Kind regards,
    Øyvind

Reply
  • Hi Mike,
    Thanks for sharing these details.

    Mike Wirth said:
    Not in my experience After removing and reinstalling the SDK, old project info still persists in SES.

    First of all, this is a known issue with SES. But what version of SES are you opening, the one that follows Toolchain Manager or a manually installed? I'm not sure what you mean with list of recent projects. The Open nRF Connect Project dialog will list available projects in the nRF Connect SDK folder. This will be samples found under both nrf/samples and zephyr/samples, and you can narrow these down with the different checkboxes. 

    Are you able to see nRF Connect SDK Release and Toolchain versions? Make sure that the Segger Embedded Studio actually points to correct nRF Connect SDK folder. You can check this under Tools --> Options --> nRF Connect --> Directories.

    From the support information you provided, I can see that you have the following SDK versions:

      "sdks": [
        {
          "version": "1.9.1",
          "path": "/Users/mike/ncs"
        },
        {
          "version": "Zephyr 3.0.99",
          "path": "/Users/mike/zephyrproject"
        },
        {
          "version": "1.9.1",
          "path": "/opt/nordic/ncs/v1.9.1"
        }

    If your SES is pointing to /opt/nordic/ncs/v1.9.1 will it still give the script error /syntax error?

    Mike Wirth said:
    The resulting Toolchain Manager window below shows that the final configuration Is broken in at least one way -- the Open SES button is missing.

    I had similar issues when trying to download the SDK via VPN or LTE connection. Are you downloading on a corporate network or using a corporate computer? The solution that worked for me was to use a standard WiFi connection at home or similar (non-restricted connection) to download.

    Mike Wirth said:
    I don't believe I've done a recent manual installation of the SDK.  I did however do a separate manual installation of the Zephyr system in order to create a testbed for working out some of my device tree and Kconfig issues without nRF SDK complications.  That installation seems to work OK, and have the recommended directory structure.

    There are 3 installations. Make sure to use the correct one in e.g. VS Code and SES, i.e. /opt/nordic/ncs/v1.9.1/

    Mike Wirth said:
    As an additional, possibly useful bit of information, here are the environment variables that are defined when I "Open Terminal" from with Toolchain Mgr (and I presume are active when I start SES from there as well).

    Yes, this looks correct as per my last comment above. When opening SES from the Toolchain Manager (as long as you actually have the Open SES button) it should inherit the same settings.

    Kind regards,
    Øyvind

Children
No Data
Related