Arduino BSP Setup

You can install the Adafruit Bluefruit nRF52 BSP in two steps:

nRF52 support requires at least Arduino IDE version 1.6.12! Please make sure you have an up to date version before proceeding with this guide!
Please consult the FAQ section at the bottom of this page if you run into any problems installing or using this BSP!

1. BSP Installation

Recommended: Installing the BSP via the Board Manager

  • Download and install the Arduino IDE (At least v1.6.12)
  • Start the Arduino IDE
  • Go into Preferences
  • Add as an 'Additional Board Manager URL' (see image below)
  • Restart the Arduino IDE
  • Open the Boards Manager option from the Tools -> Board menu and install 'Adafruit nRF52 by Adafruit' (see image below)

It will take up to a few minutes to finish installing the cross-compiling toolchain and tools associated with this BSP.

The delay during the installation stage shown in the image below is normal, please be patient and let the installation terminate normally:

  • Once the BSP is installed, select 'Adafruit Bluefruit nRF52 Feather' from the Tools -> Board menu, which will update your system config to use the right compiler and settings for the nRF52:

2. Third Party Tool Installation

The following third party tools must also be installed on your system to allow you to work with the Bluefruit nRF52 Feather:

This step is only required on OS X and Linux. If you are using Windows, a pre-built 32-bit binary of nrfutil is already included in the BSP that should work out of the box for most setups.
You will need to have both Python and pip available on your system to use the tools below!

nrfutil (OS X and Linux Only)

This is a python wrapper for Nordic's nrfutil, which is used to flash boards using the built in serial bootloader.

To install this tool, firstly git clone or download nRF52_nrfutil repo here then open a terminal, go into the folder and run the following command to installing requirements

$ sudo pip install -r requirements.txt

If you get issue that nose and tornado are not installed

matplotlib 1.3.1 requires nose, which is not installed.

matplotlib 1.3.1 requires tornado, which is not installed.

Simply install those with following commands

$ sudo pip install tornado nose

Or having issue with six

Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall

then add --ignore-installed six to the command

$ sudo pip install -r requirements.txt --ignore-installed six

After all requirements is install, run this command to install nrfutil

$ sudo python install

Check your install with version sub command

$ nrfutil version
nrfutil version 0.5.2
Don't install nrfutil from the pip package (ex. `sudo pip install nrfutil`). The latest nrfutil does not support DFU via Serial, and you should install the local copy of 0.5.2 included with the BSP via the `python install` command above.
If you get a 'sudo: pip: command not found' error running 'sudo pip install', you can install pip via 'sudo easy_install pip'

3. Advanced Option: Manually Install the BSP via 'git'

If you wish to do any development against the core codebase (generate pull requests, etc.), you can also optionally install the Adafruit nRF52 BSP manually using 'git', as decribed below:

Adafruit nRF52 BSP via git (for core development and PRs only)

  1. Install BSP via Board Manager as above to install compiler & tools.
  2. Delete the core folder nrf52 installed by Board Manager in Adruino15, depending on your OS. It could be
    OS X~/Library/Arduino15/packages/adafruit/hardware/nrf52
  3. Go to the sketchbook folder on your command line, which should be one of the following:
    OS X: ~/Documents/Arduino
    Linux: ~/Arduino
    Windows: ~/Documents/Arduino
  4. Create a folder named hardware/Adafruit, if it does not exist, and change directories into it.
  5. Clone the Adafruit_nRF52_Arduino repo in the folder described in step 2:
    git clone [email protected]:adafruit/Adafruit_nRF52_Arduino.git
  6. This should result in a final folder name like '~/Documents/Arduino/hardware/Adafruit/Adafruit_nRF52_Arduino' (OS X).

  7. Restart the Arduino IDE



The following FAQs may be useful if you run into any problems:

Windows Related

If you are using BSP 0.6.0 or greater, there are no known issues with the BSP installation process on Windows. Please update to the latest version if you currently have an earlier release.

OS X Related

I can compile and link sketches on OS X, but nrfutil gives me the following error: 'AttributeError: 'int' object has no attribute 'value''?

Depending on your system setup and Python version, you may need to make a manual adjustment to a file in nrfutil, which is used when compiling and flashing files from the Arduino IDE.

Open the following file (please note that the BSP version number in the path may be different!): ~/Library/Arduino15/packages/adafruit/hardware/nrf52/0.5.1/tools/nrfutil-0.5.2/nordicsemi/dfu/ ... and make the following changes:

@@ -79,7 +79,7 @@
-        for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
+        for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
@@ -94,7 +94,8 @@
-        for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
+        for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):

Linux Related

On Linux I'm getting 'arm-none-eabi-g++: no such file or directory', even though 'arm-none-eabi-g++' exists in the path specified. What should I do?

This is probably caused by a conflict between 32-bit and 64-bit versions of the compiler, libc and the IDE. The compiler uses 32-bit binaries, so you also need to have a 32-bit version of libc installed on your system (details). Try running the following commands from the command line to resolve this:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386
Last updated on Jun 12, 2018 Published on Mar 22, 2017