- 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.
- 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, thensudo ln -s /Applications/ARM /opt/gnuarmemb
- Optional: Download
gn.zip
andunzip
as described, but then move the resultinggn
executable to/usr/local/bin
instead of changingPATH
. 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
- This is equivalent to
- Now
west build -b nrf9160dk_nrf9160ns
will do.
- Add these two lines to
- To flash from the command line:
- If not already installed, install the JLink tools from Segger (the one from Nordic is old): https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg
- Download nRF Command Line Tools from https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download
- Mount (double-click) the DMG in the tar, then run (right-click and open) the “Install nRF Tools” item.
nrfjprog
is automatically added to the path, so now a simplewest flash
will do.
- Download