nRF Connect Installation on macOS (Manual Installation)

I have not been able to create a stable development environment in macOS Monterey using the automatic installation process. 

In order to better understand and document the issues, I am going to do four separate installations for comparison.

MacBook Pro 1:  Manual Installation

MacBook Pro 2:  Automatic installation

https://devzone.nordicsemi.com/f/nordic-q-a/88566/nrf-connect-installation-on-macos-automatic-installation/editpost?ContentTypeId=0

Linux Ubuntu:     Manual Installation

Windows 11:       Automatic installation

This thread will cover the first case, the manual installation on macOS. I will create separate support tickets for the other cases and provide links.

Parents
  • For the macOS manual installation process, 

    Get the nRF Connect SDK code

    It says create a folder called ncs to hold all nRF Connect SDK repositories, but doesn't specify a location to create this folder

    Where should this folder be created please?

  • Hi,

    Using the toolchain manager to install the nRF Connect SDK should work on macOS Monterey, and works well on my computer. Perhaps you can elaborate on what is not working? One important note though, is that for programming to work directly form VS Code you need to install the universal version of J-Link Software and Documentation Pack (with both Intel and ARM support in the same package).

    alwalker said:
    Where should this folder be created please?

    I do not believe there is any restrictions on that, as long as your user is allowed to read and write to/from the location that is being used.

  • Hi Einar,

    Thanks, but I've submitted several tickets, that still remain unresolved, indicating that there are issues with the automatic installation process for macOS, so can we start from the assumption that there are issues please?

    Having spent some months trying to get a stable development environment up and running, I am now doing this parallel installation exercise to identify where issues are occurring, both to get me to the point of actually being able to do code development in at least one of the operating systems, and benefit other users who may experience the same issues. 

    You should be able to view all the tickets (one is private so I won't provide a link here). The public ones are:

    https://devzone.nordicsemi.com/f/nordic-q-a/85101/implementing-developing-bluetooth-low-energy-products-using-nrf-connect-video-on-nrf5340-dk

    https://devzone.nordicsemi.com/f/nordic-q-a/84319/nrf-connect-for-vs-code-youtube-videos-having-problems-with-include-paths-and-kconfig-in-mac-os

    As requested by Dejan Simonovic (who handled the private ticket), I am going to open another ticket for the macOS automatic installation, which I am currently doing in parallel on a MacBook Pro that has never had nRF Connect etc. installed so it is a virgin installation. Despite installing the Command Line Tools, I am getting error message saying

    The "python3" command requires the command line developer tools. Would you like to install the tools now?

    Repeating the installation has no effect. I'll document what I've done in the ticket I raise for the automatic build. I note your comment about the universal version of the J-Link software, however the macOS download for the Command Line Tools only gives me the choice of Install J-Link for x86 or Install J-Link for M1, with no shortcut to install the Universal version, so that's one thing that could perhaps be fixed.

    https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs

    Going back to the manual installation:

    I have a folder in my user path called workspace which is where I put all my project folders (including ones cloned from GitHub like the LC3 codec), so I believe that this is an appropriate place to put the ncs folder.

    I will proceed on this basis unless you advise otherwise.

    Kind regards,

    Al

  • Hi Al,

    I see, if you already have a different thread for this then there is no point in duplicating. But just to comment on what you have written about here,

    alwalker said:
    The "python3" command requires the command line developer tools. Would you like to install the tools now?

    Where do you see this error? Remember that to get the proper toolchain form the terminal you should open the terminal from the Toolchain manager, as this will configureenvironment variables (path etc) for you.

    alwalker said:
    macOS download for the Command Line Tools only gives me the choice of Install J-Link for x86 or Install J-Link for M1, with no shortcut to install the Universal version, so that's one thing that could perhaps be fixed.

    Yes, this is a problem with the current version. You need to download the J-link installer directly from Segger to get the universal package for now.

    alwalker said:

    Going back to the manual installation:

    I have a folder in my user path called workspace which is where I put all my project folders (including ones cloned from GitHub like the LC3 codec), so I believe that this is an appropriate place to put the ncs folder.

    Note that manual installation is not supported or recommended on Mac (though it is of course possible). So I recommend using the toolchain manager.

    LE Audio is not supported in 1.9.1, so before 2.0.0 is released you will need the 1.9.99-dev1 tag. I tested this approach on Mac

    Step 1. Install 1.9.1 from the toolchain manager.


    Step 2 Instructions to get the v1.9.99-dev1 devtag:

    Open a terminal window from the toolchain manager

    $mkdir ncs_audio

    $cd ncs_audio

    $west init -m github.com/.../sdk-nrf --mr v1.9.99-dev1

    $west update

    $west zephyr-export

    Step 3 Instructions for verifying and building the nrf5340_audio application:

    Only required before first build

    $cd ncs_audio/nrf

    $west config manifest.group-filter +nrf5340_audio

    $west update

    Step 4

    $cd ncs_audio/nrf/application/nrf5340_audio/tools/buildprog

    $python ./buildprog.py -c both -b debug -d both

  • Hi Einar,

    Thanks very much, the instructions that you've given for building and running the nRF5340_audio application are most helpful, and indeed is exactly the step-by-step guide that I requested on the private thread. I think it would be beneficial for other users if this information also appears on this page:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html

    I found with the previous macOS automatic installation that West hadn't been installed as part of the process, and so had to do it manually. So whilst I understand that Nordic recommends the automatic installation and doesn't support the manual installation, I hope you can see that there are too many undocumented issues and inconsistencies to have confidence in the automatic installation process - just to take two examples, that the required J-Link universal version is not included in the Command Line tools download and the fact that V1.9.1 doesn't support LE Audio, both of which I have not seen documented elsewhere.

    On this machine which I'm using for the manual installation, I was able to do a blanket override on permissions using the Developer Tools privacy option in System Preferences. This only appears to be an option if you already have Apple Xcode installed, as it doesn't appear on my other Mac (which I'm currently downloading Xcode on). I'm also hoping that installing Xcode will provide the necessary Python install which appears to be missing from that machine, judging by the error message I reported.

    Anyway, back to the manual installation process, as I indicated this is more about a process of discovery to determine what does and doesn't work with the automatic installation versus the manual one.

    Kind regards,

    Al

  • Hi Al,

    That is good to hear.

    Regarding LE Audio it is simply too new to be part of the previous release, but it is part of the 2.0.0 release that is coming these days. Also, the proper J-Link version to be included in the next nRF Command Line tools release (10.16.0) which is also right around the corner.

Reply Children
  • Hi Einar,

    I completed the manual installation process, but encountered the same issues with installing nRF Connect SDK v2.2.0 as I did with the automatic installation, specifically the installation hanging on the memfault repository stage.

    I followed your guidance to install the universal version of the J-Link software, but I noticed this line in the nRF Connect log file when updating the toolchain after restarting Toolchain Manager:

    2022-06-03T09:55:41.967Z INFO Installed JLink version does not match the provided version (V7.58b)

    Is this the reason why the Open SEGGER J-Link button is not shown for the nRF Connect SDK v2.2.0 release for either the automatic or manual installations please?

    Also there appears to be a stage that is missed in the automatic installation process, as with the manual version I did not get the issue when I launched VS Code and selected V2.0.0 for both nRF Select SDK and nRF Connect Toolchain, I get an error saying Shell initialization conflicts nRF Connect terminal profile with a link to the following information:

    This issue may occur when opening the internal terminal with the nRF Connect profile, which sets the shell environment for the configured SDK and toolchain, but the shell initialization script (e.g. .bashrc) overrides the environment. This can happen if the ZEPHYR_BASE environment variable is set in .bashrc. If there is no need for external terminals to use this variable, we suggest removing this from .bashrc, otherwise it can be moved to .bash_profile or an equivalent script that is only loaded by login shells.

    https://nrfconnect.github.io/vscode-nrf-connect/connect/troubleshooting.html#shell-initialization-conflicts-nrf-connect-terminal-profile

    This didn't occur with the manual installation, perhaps something to look at please?

    Kind regards,

    Al

  • Hi Al,

    alwalker said:

    I followed your guidance to install the universal version of the J-Link software, but I noticed this line in the nRF Connect log file when updating the toolchain after restarting Toolchain Manager:

    2022-06-03T09:55:41.967Z INFO Installed JLink version does not match the provided version (V7.58b)

    Is this the reason why the Open SEGGER J-Link button is not shown for the nRF Connect SDK v2.2.0 release for either the automatic or manual installations please?

    I do not have an answer for this at the moment, but it has been reported and is followed up in this thread, so I recommend you follow that.

    alwalker said:

    Also there appears to be a stage that is missed in the automatic installation process, as with the manual version I did not get the issue when I launched VS Code and selected V2.0.0 for both nRF Select SDK and nRF Connect Toolchain, I get an error saying Shell initialization conflicts nRF Connect terminal profile with a link to the following information:

    This issue may occur when opening the internal terminal with the nRF Connect profile, which sets the shell environment for the configured SDK and toolchain, but the shell initialization script (e.g. .bashrc) overrides the environment. This can happen if the ZEPHYR_BASE environment variable is set in .bashrc. If there is no need for external terminals to use this variable, we suggest removing this from .bashrc, otherwise it can be moved to .bash_profile or an equivalent script that is only loaded by login shells.

    As stated here, you should not set ZEPHYR_BASE (depending on your shell that means it should not be in .bashrc nor .zshrc, for instance). 

    Einar

  • Hi Einar,

    Thanks very much, the Install J-LINK for x86 included with the nrf-command-tools-10.15.4-Darwin package installs v7.58b, which is why I've never seen the issue before with previous installations as I used this version rather than the Universal one which installs V7.66b.

    For the second issue, where are .bashrc and .bash_profile located please? I couldn't locate them when searching in Finder. As I commented, this is an issue for the automatic installation, it didn't occur with the manual installation, and I didn't set anything for ZEPHYR_BASE for either install.

    Kind regards,

    Al

  • Hi Al,

    If I remember correctly macOS Monterey use zsh by default, so then .zshrc is what you are looking fore (and not bash related config files).

    Einar

  • Hi Einar,

    I set Bash as the terminal shell for both manual and automatic installations prior to starting them. For the Mac with the automatic installation, I can’t find either .bashrc or .zshrc files. I can’t see these files on the Mac with the manual installation either.

    Kimd regards,

    Al

Related