Skip to content

Instantly share code, notes, and snippets.

@BryanJBryce
Forked from adricasti/Readme.md
Last active January 18, 2024 11:46
Show Gist options
  • Save BryanJBryce/43f5e36475fd5cd1336136c6154b2d13 to your computer and use it in GitHub Desktop.
Save BryanJBryce/43f5e36475fd5cd1336136c6154b2d13 to your computer and use it in GitHub Desktop.
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Sierra 10.12.5
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
brew cask install gcc-arm-embedded
  1. Download and unzip inside ~/Development/nRF52/
  1. Install command line tools
brew cask install nrf5x-command-line-tools
  1. Change the nRF SDK to use my version of arm-gcc changing the file ~/Development/nRF52/SDK_X.X.X/components/toolchain/gcc/Makefile.posix to reflect the location of my homebrew installed version
GNU_INSTALL_ROOT := /usr/local/Caskroom/gcc-arm-embedded/6-2017-q2-update/gcc-arm-none-eabi-6-2017-q2-update/bin
GNU_VERSION := 5.4.1
GNU_PREFIX := arm-none-eabi
  1. Install J-Link Software and Documentation pack for MacOSX 6.14h

Testing

cd ~/Development/nRF52/SDK_14.0.0/examples/peripheral/blinky/pca10040/blank/armgcc
make
make flash

Credits

I just made a concise version of Aaron Eiche's Programming an nRF52 on a Mac

@obra
Copy link

obra commented Nov 7, 2023

brew cask install homebrew/cask-drivers/nordic-nrf-command-line-tools

And in 2023, this is

brew install nordic-nrf-command-line-tools

@BenShelton
Copy link

This has now changed to brew install --cask nordic-nrf-command-line-tools

See https://formulae.brew.sh/cask/nordic-nrf-command-line-tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment