Skip to content

Instantly share code, notes, and snippets.

@hraftery
Last active July 27, 2021 21:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hraftery/506a70aeb9223480af8a343eb70fb122 to your computer and use it in GitHub Desktop.
Save hraftery/506a70aeb9223480af8a343eb70fb122 to your computer and use it in GitHub Desktop.
Installing nRF Connect SDK on macos

Installing nRF Connect SDK on macos

Conditions

  • Applicable to the nRF9160-DK and probably other platforms the SDK supports.
  • Correct as at 2021-04-07. Many fast moving parts so will likely age quickly.

Instructions

  • Install "nRF Connect for Desktop" from Nordic: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop/Download#infotabs
  • Run nRF Connect and "Install" then "Open" the “Getting Started Assistant”.
  • No need to use the online docs, just follow the "Getting Started Assistant" instructions, except:
    • Download gcc-arm-none-eabi-10-2020-q4-major-mac.pkg instead of the recommended "8-2019-q3-update of the GNU ARM Embedded toolchain". The newer version works, despite the warning. The pkg is necessary so all the binaries and libraries are signed. Install from pkg, then sudo ln -s /Applications/ARM /opt/gnuarmemb
    • Optional: Download gn.zip and unzip as described, but then move the resulting gn executable to /usr/local/bin instead of changing PATH. Note this work fine the first time, but second time I did it I needed to correct permissions to same as other executables.
    • Run /Applications/arm_segger_embedded_studio_v534a_macos_x64_nordic/SEGGER\ Embedded\ Studio\ for\ ARM\ 5.34a.app/Contents/MacOS/emStudio from command line instead of double clicking the app, or else deal with horribly elusive issues with incorrect discovery of executables like python. Just like Eclipse.
    • To build from the command line:
      • Add these two lines to ~/.zephyrrc:
        • export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
        • export GNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb
      • And set up the command line environment with: source ncs/zephyr/zephyr-env.sh
        • This is equivalent to source $ZEPHYR_BASE/zephyr-env.sh
      • Now west build -b nrf9160dk_nrf9160ns will do.
    • To flash from the command line:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment