- MacOS Mojave 10.14.4
- MacBook Pro (Retina, 13-inch, Late 2012)
- nRF52-DK (PCA10040)
- Install GCC
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi
- Download and unzip inside
~/Development/nRF52/
- nRF5-SDK 15.3.0 in
SDK_15.3.0
folder - nRF5 Command Line Tools 9.8.1 in
CLT_9.8.1
folder
- Symlink command line tools
ln -s ~/Development/nRF52/CLT_9.8.1/nrfjprog/nrfjprog /usr/local/bin/nrfjprog
ln -s ~/Development/nRF52/CLT_9.8.1/mergehex/mergehex /usr/local/bin/mergehex
- Change the nRF SDK to use my version of arm-gcc changing the file
~/Development/nRF52/SDK_15.3.0/components/toolchain/gcc/Makefile.posix
to reflect the location of my homebrew installed version
GNU_INSTALL_ROOT := /usr/local/Cellar/gcc-arm-none-eabi/20180627/bin
GNU_VERSION := 7.3.1
GNU_PREFIX := arm-none-eabi
cd ~/Development/nRF52/SDK_15.3.0/examples/peripheral/blinky/pca10040/blank/armgcc
make
make flash
I just made a concise version of Aaron Eiche's Programming an nRF52 on a Mac
I agree that setting up Eclipse is a pain! I wrote a blog post a few weeks ago to address this. It may be a lengthy tutorial but it goes through setting up the toolchain, IDE (NetBeans in this case), compiling, flashing and being able to debug and step through code on the target.
You may find it helpful: http://www.novelbits.io/nrf52-mac-development-tutorial/