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.

  • I have started. to install nRF Connect for Desktop on another MacBook Pro.  It's an older 5,3 model, but running a clean installation of macOS Monterey.  Hopefully, installation here, if it's different from my MBP 10,1 will help me diagnose the problems I'm seeing.

    Installation on the MBP is not yet complete.  Here are two issues encountered along the way:

    • Automatic SDK installation cannot be done.  When a newly installed nRF Connect app is installed and launched, the plugins selector window  opens, but, is totally blank/gray.  This is probably due to a graphics patch in macOS to allow it to run on this older machine.  So ignoring this problem for the moment.

    But it does mean that I needed to revert to the manual SDK installation instructions for this test.  Did so.  All proceeded correctly and a full set of repositories, and tools were installed -- all the way to the end of installation instructions, just before first use of SES or VS Code.

    • Except for one item, which has been experienced on all macOS installations.  Despite what's (implied?) in the documentation, there is no command line launcher for west.  West is not an app, but a Python module.  Normally in such cases, there is a small executable app, a stub, which when started launches the module.  I've found no such stub in the west directory or related files.  Am I missing something?

    As noted in the attached terminal log, "west" is not a recognized command, but "python -m west" (i.e., invoking it as a module) works everywhere.

    mike@Mikes-MBP-53 ~ % west --help
    zsh: command not found: west
    mike@Mikes-MBP-53 ~ % python -m west --help
    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
    
    The Zephyr RTOS meta-tool.
    
    optional arguments:
      -h, --help            get help for west or a command
      -z ZEPHYR_BASE, --zephyr-base ZEPHYR_BASE
                            Override the Zephyr base directory. The default is
                            the manifest project with path "zephyr".
      -v, --verbose         Display verbose output. May be given multiple times
                            to increase verbosity.
      -V, --version         print the program version and exit
    
    built-in commands for managing git repositories:
      init:                 create a west workspace
      update:               update projects described in west manifest
      list:                 print information about projects
      manifest:             manage the west manifest
      diff:                 "git diff" for one or more projects
      status:               "git status" for one or more projects
      forall:               run a command in one or more local projects
    
    other built-in commands:
      help:                 get help for west or a command
      config:               get or set config file values
      topdir:               print the top level directory of the workspace
    
    Cannot load extension commands; help for them is not available.
    (To debug, try: "west manifest --validate".)
    
    Run "west help <command>" for help on each <command>.
    mike@Mikes-MBP-53 ~ % 
    

    Surprising that this issue doesn't cause more extensive problems.  At the moment it has halted my progress with the manual SDK next step, setting up SES.  I need to enter the pathname of the west executable in the SES configuration, but there is no such file apparent.

    FYI, here's the structure of the west package, as reported by pip:

    mike@Mikes-MBP-53 ~ % pip3 show -f west 
    Name: west
    Version: 0.12.0
    Summary: Zephyr RTOS Project meta-tool
    Home-page: https://github.com/zephyrproject-rtos/west
    Author: Zephyr Project
    Author-email: [email protected]
    License: UNKNOWN
    Location: /Users/mike/.asdf/installs/python/3.10.2/lib/python3.10/site-packages
    Requires: colorama, packaging, pykwalify, PyYAML, setuptools
    Required-by: 
    Files:
      ../../../bin/west
      west-0.12.0.dist-info/INSTALLER
      west-0.12.0.dist-info/LICENSE
      west-0.12.0.dist-info/METADATA
      west-0.12.0.dist-info/RECORD
      west-0.12.0.dist-info/REQUESTED
      west-0.12.0.dist-info/WHEEL
      west-0.12.0.dist-info/entry_points.txt
      west-0.12.0.dist-info/top_level.txt
      west/__init__.py
      west/__main__.py
      west/__pycache__/__init__.cpython-310.pyc
      west/__pycache__/__main__.cpython-310.pyc
      west/__pycache__/build.cpython-310.pyc
      west/__pycache__/cmake.cpython-310.pyc
      west/__pycache__/commands.cpython-310.pyc
      west/__pycache__/configuration.cpython-310.pyc
      west/__pycache__/log.cpython-310.pyc
      west/__pycache__/manifest.cpython-310.pyc
      west/__pycache__/util.cpython-310.pyc
      west/__pycache__/version.cpython-310.pyc
      west/app/__init__.py
      west/app/__pycache__/__init__.cpython-310.pyc
      west/app/__pycache__/config.cpython-310.pyc
      west/app/__pycache__/main.cpython-310.pyc
      west/app/__pycache__/project.cpython-310.pyc
      west/app/config.py
      west/app/main.py
      west/app/project.py
      west/build.py
      west/cmake.py
      west/commands.py
      west/configuration.py
      west/log.py
      west/manifest-schema.yml
      west/manifest.py
      west/util.py
      west/version.py
      west/west-commands-schema.yml
    mike@Mikes-MBP-53 ~ % 
    

    Do you have a quick suggestion for this west executable issue?  If not, I won't be able continue testing on this alternate MacBook Pro.

    Thanks,

    Mike

  • Results of Further Testing:

    • My Windows 10 VM was broken. Built a new, clean Win10 VM (64-bit), installed nRF Connect for SDK Desktop app, Tool Manager, SDK 1.91.  All went without error!
    • From an "Open Terminal" window, it is possible to demonstrate that the west.exe stub does exist and west can be invoked directly from the command line, both of which can be seen from this screen shot.

    • SES launches properly from clicking the "Start SES" button in Tool Manager.
    • The Project Options pane opens without error from the "File | Open nRF Project..." SES menu command.
    • Solution nrf_ dm on nrf52840dk_ nrf52840 generated and built OK
    • Solution nrf_ led matrix on bbc_ microbit v2 generated and built OK

    In other words, everything worked as it should on Windows 10.

    In contrast, I should note:

    • Here's the corresponding terminal output regarding the configuration of the west module on my MacBook Pro running macOS Monterey:
    • Note that a "west.exe" doesn't exist (That's a Windows app), but a "west" file does exist at pathname "../../../west"
    • Converting to an absolute path, that's: /Users/mike/.asdf/installs/python/3.10.0/bin/west
    • That's inside a directory controlled by the asdf virtual environment system I'm using to control multiple Python versions (a multi-language tool more general than env) and, unfortunately, not in the right place to be executed directly from the command line.

    Not sure how to correct this yet, but it certainly points to a problem with west execution in my particular macOS environment.  

    Not sure yet if all of the issues I've encountered are due to this one cause, but fixing it is certainly a good place to start.  I've noted that your online docs now(?) include some comments about use of venv in the Mac environment.  Would be great if you could get together with one of your Python experts to sort out what the proper nRF SDK installation procedures are in a complex Python environment.  I suspect this isn't just a macOS problem, just where we've first encountered it.

    I'll work from my end, but I'm neither a venv or asdf expert.  Just give me some suggestions and I'll try them out.  I suspect this will result in some extra cautions in the documentation or even changes to the installation code.

    Thanks,

    Mike

  • Hi Mike, thanks for pointing the issue with West out. I agree that west does exist/is installed correctly, but it looks like the path to your python packages have not been added to your PATH variable. Could you try running the following PATH=$PATH:${HOME}/.local/bin

    I see that you had a similar issue here, is this the same issue?

    Kind regards,
    Øyvind

  • Øyvind,

    Thanks for the suggestion to add to my PATH variable, presumably to fix west access.  Since my last message, I added Python 3.10.3 to my set of installed Python versions, all under control of asdf.  Being careful with the new install appears to have fixed my asdf configuration issue.

    I removed my last v1.9.1 SDK  installation and reinstalled using nRF Connect for Desktop/Toolchain Manager.  The installation went without error.  And west is now accessible from the command line in a terminal session opened from the Toolchain Manager pane | downward triangle button.

    That's the good news.  But I still get the red Script Error popup in the nRF Connect Options window in SES (exactly as reported in the very first message that created this ticket).  

    Asking again, can you give me the pathname of the script file that produces the JSON error?  Knowing that, I try to diagnose where that file is being corrupted.

    Thanks,

    Mike

  • Mike,

    do you get anything in the output pane of SES when you get this script error popup? 

Related