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

nRF Connect SDK installation dependence on bash vs zsh impedes use on macOS

I've been attempting to install nRF Connect SDK with both the SEGGER Embedded Studio and VS Code IDEs on and off for several months now.  These attempts have included automatic installation using various versions of the nRF Connect App and the Toolchan Manager (for both IDEs) and manual installation (for SES).  All attempts ended with some error that proved to be a rathole, a waste of effort.  (You can get a feel for this by looking at the tickets I've submitted.). All of these errors are some sort of configuration error and west appears to be involved in some way.

Digging into the detailed west installation instructions, I've found that it requires shell completion, which is only implemented for the bash shell.  Herein lies a problem for all recent-macOS users, where zsh is the default shell. Therefore, shell completion for west setup fails on Macs and the configuration is incomplete (e.g., the environment variables for west are never set, etc.). Many confusing errors then ensue when attempting to use the IDE.

I suspect the following are possible solutions:

  1. Port west-completion.bash to zsh and update the instructions
  2. Provide a set of instructions for manually accomplishing what the west-completion.bash does
  3. Point me at a complete description of the environment west expects (e.g., environment variables, directory and file organization, etc.) so I can configure it manually.

Comments?  Suggestions?  I'm surprised that anyone has succeeded in getting nRF Connect SDK working on the Mac, or is everyone a more clever bash and zsh programmer than I am Wink

TIA,

Mike (who's especially looking forward to experimenting with the VS Code version of the toolchain)

  • Looks like I may have found a workaround (or solution) for this problem.  If I scrub my system:

    • Uninstall west and all fragments of prior west installations (I had several),
    • Remove all Nordic SDK, toolchain, etc., files and directories, and
    • Ensure that I have the latest versions of the following installed:
      • macOS Monterey 12.1 Beta (21C5039b), the latest developer release
      • nRF Connect for Desktop 3.9.1
      • Toolchain Manager plug-in official v0.10.1
      • asdf virtual environment manager with Python 3.10.0, such that "python -V" ==> Python 3.10.0
      • pip 21.3.1

    then I can successfully install the SDK, along with both SES and VS Code IDE's using the "automatic" procedures invoked from Toolchain Manager.

    Two notes:

    1. I still get a failure when trying to update the toolchain using the command in the SDK button  (see the screenshot below).
    2. I've now been able to install both the SES and VS Code IDEs, allowing me to proceed far enough with the latter to encounter a crashing bug.  See my new ticket here

    So, we could probably close this ticket.  But I highly recommend you insert a warning In the documentation for nRF Connect SDK installation to make sure the user has a clean system before attemptng an installation.

    Hope this helps,

    Mike

Related