This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Installing nRF Connect for Desktop on macOS with APFS file system,?

Folks,

System Info: MacBook Pro (10,1; 15" Retina, Early 2013), Running macOS 10.15.6 "Catalina", with 500GB SSD, formatted with APFS, into a RO system partition and a R/W data partition.

I have gone through multiple sessions of attempting to install Nordic Connect for Desktop on the above system using both the nRF Connect app, Getting stated Assistant (official, v1.0.8) and the manual procedure documented online.  Here are some observations about that process:

  • Using the Getting Started Assistant, Section 1 proceeds without problem and all "Verify" tests yield positive results.
  • GSA. Section 2, is where troubles start:
    • pip3 install west runs fine (or appears to).
    • Actually a more detailed version of this command and checking afterwards reveals a potential problem.  Because of the read-only setting of the system partition, the installer script for west doesn't install it for all users in /.local/bin/ or /bin/sh/ but rather in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages.
    • Subsequently, west works just fine when invoked from the command line, but when run from inside other scripts, those scripts fail to find the executable.  (Adding this directory to the PATH search path appeared to solve this in some cases of west calls inside other scripts, but I did not test this exhaustively)
    • Now (with or without adding to the PATH variable), all of the "Verify" button presses in the other GSA Section 2 steps yield red /bin/sh: west: command not found responses, even though the command lines in each step appear to have functioned correctly.
  • GSA Section 3 proceeded without problem to download and install Segger Embedded Studio.
  • GSA Section 4, setting Tools > Options > nRF Connect tab settings were done without problem (with the appropriate change to the actual path for west).  
    • In the next step, Select File > Open nRF Connect SDK Project, these settings were tried repeatedly for multiple boards and the asset tracker sample app, but...
    • ...in all cases, when the "Click OK to open the project" was done and the configure and build scripts were run, they would fail in multiple and curious ways

Questions:

  1. Has anyone succeeded in installing nRF Connect for Desktop on macOS Catalina (or a Big Sur beta) with an APFS-formatted system disk?  If so, what do I need to do to get around the above listed issues?
  2. Out of curiosity, when I've successfully completed this installation, do I have a full "base" installation of Zephyr (i.e., without all the optional modules), or do I need to go back and complete the Zephyr installation?

TIA,

Mike

Parents
  • Hi Mike,

    Has anyone succeeded in installing nRF Connect for Desktop on macOS Catalina (or a Big Sur beta) with an APFS-formatted system disk?  If so, what do I need to do to get around the above listed issues?

    You can see from the error that there is a problem with west not being in the path. I also had issues with this, but got it working by installing (and managing) python via pyenv, as described here.

    Out of curiosity, when I've successfully completed this installation, do I have a full "base" installation of Zephyr (i.e., without all the optional modules), or do I need to go back and complete the Zephyr installation?

    Yes. If you follow the guide you will check out all repositories that are needed, including the full Zephyr repo. That is all handled for you by the west tool. (For instance, "west init -m github.com/.../sdk-nrf --mr v1.3.0" will check out the full nRF Connect SDK 1.3, including Zephyr, mcuboot and a large number of other repositories).

    Einar

  • Many thanks, Einar.  Will give this a shot and see how it works.

    Have passed your Python3 installation recommendations along to several friends who are heavy Python aficionados and teachers.

    Mike

  • My bad -- I see that I was interpreting "build" as a west command, rather than the directory containing the build instructions.  Please forgive that newbie error.

  • Hi Mike,

    Mike Wirth said:
    The final linking failed because the module "elftools" was missing (but I presume that can be readily corrected.-- how?)

    This is part of a python package that should be installed when you follow the instructions like this (specifically it is part of the zephyr requirements):

    pip3 install -r zephyr/scripts/requirements.txt
    pip3 install -r nrf/scripts/requirements.txt
    pip3 install -r bootloader/mcuboot/scripts/requirements.txt

    Can you make sure you do that?

  • Einar,

    As I noted, elftools is not installed in my current configuration.  Furthermore, the three pip3 lines you quoted do not install elftools.  I executed them again and verified that elftools wasn't present either before or after their execution.  And all three commands reported "Requirement already satisfied:" for all invocations.

    As an experiment, I tried "pip3 install elftools" as an experiment.  It failed with:

    % pip3 install elftools
    ERROR: Could not find a version that satisfies the requirement elftools (from versions: none)
    ERROR: No matching distribution found for elftools
    

    I also used pip3 to list all of the packages in my configuration and noted that there is a package installed called pyelftools:

     

     % pip3 show pyelftools
    Name: pyelftools
    Version: 0.26
    Summary: Library for analyzing ELF files and DWARF debugging information
    Home-page: https://github.com/eliben/pyelftools
    Author: Eli Bendersky
    Author-email: [email protected]
    License: Public domain
    Location: /Users/mike/.pyenv/versions/3.8.5/lib/python3.8/site-packages
    Requires: 
    Required-by: pyocd
    

    Does this provide the functionality expected for elftools?  If so, how do we satisfy the requirement for elftools?

    Having taken care of this, do you suspect that this will solve the problem with opening an nRF Project in SES later?  Be great if it does.

    Thanks,

    Mike

  • Hi Mike,

    Mike Wirth said:
    I also used pip3 to list all of the packages in my configuration and noted that there is a package installed called pyelftools

    pyelftools is the package that gives you elftools. It is a pure python library, and all/any dependencies are installed by pip, so that should not be a problem.

    Mike Wirth said:
    Does this provide the functionality expected for elftools?  If so, how do we satisfy the requirement for elftools?

    If you still get the error that elfools is missing, I suspect a problem with the python and/or path configuration on your Mac. It is difficult to know exactly what causes it, though, and I have not seen this issue myself.

    Mike Wirth said:
    Having taken care of this, do you suspect that this will solve the problem with opening an nRF Project in SES later?  Be great if it does.

    I don't know, to be honest. I do not recall seeing the errors you get in SES before. But it is clear that there is a problem with your installation, as you get the issue with elftools. So I would suggest focusing on one issue at a time, fixing it, before moving on as they may have the same cause (so fixing one may fix others).

    There is another possible approach if you don't make progress. We are aware that the process of getting the toolchain installed can be painful, and therefore we have added a Toolchain Manager app to nRF Connect for desktop. That will give you a complete toolchain package independence of the system. It is currently only has full support for Windows, but you can try it for macOS as well, though it is not fully supported yet.

    Einar

  • Einar,

    Have given up on getting NCS for Desktop on macOS for now.  Seems prudent for the tool to mature a bit more before making another attempt. The imminent arrival of the Big Sur release of macOS also argues for a delay.

    I have successfully installed NCS for Desktop on a Win10 VM on the same MacBook Pro.  More cumbersome and less efficient, but sufficient for my needs for the moment.

    So we might as well close out this case/thread and revisit the issue later.

    Thanks for your efforts and followup on this issue.

    Mike

Reply
  • Einar,

    Have given up on getting NCS for Desktop on macOS for now.  Seems prudent for the tool to mature a bit more before making another attempt. The imminent arrival of the Big Sur release of macOS also argues for a delay.

    I have successfully installed NCS for Desktop on a Win10 VM on the same MacBook Pro.  More cumbersome and less efficient, but sufficient for my needs for the moment.

    So we might as well close out this case/thread and revisit the issue later.

    Thanks for your efforts and followup on this issue.

    Mike

Children
No Data
Related