Arduino Core for Nordic Semiconductor nRF5 based boards
Program Nordic Semiconductor nR5 based boards with the Arduino IDE.
Supported boards
- nRF52 DK
- For boards prior to
2016.9
(see sticker), the lastest JLink bootloader is required to upload sketches. To upgrade, press the boot/reset button while powering on the board and copy over the latest bootloader.
- For boards prior to
- Bluz DK
- RedBearLab BLE Nano
- RedBearLab nRF51822
Installing
Board Manager
- Download and install the Arduino IDE
- Start the Arduino IDE
- Go into Preferences
- Add
https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json
as an "Additional Board Manager URL" - Open the Boards Manager from the Tools -> Board menu and install "Nordic Semiconductor nRF5 Boards"
- Select your nRF5 board from the Tools -> Board menu
OS Specific Setup
OS X
No additional setup required.
Linux
No additional setup required.
Windows
Driver Setup for Segger J-Link
- Download Zadig
- Plugin Segger J-Link or DK board
- Start
Zadig
- Select
Options -> List All Devices
- Select
J-Link (Interface 2)
from the device dropdown - Click
Replace Driver
Flashing a SoftDevice
cd <SKETCHBOOK>
, where<SKETCHBOOK>
is your Arduino Sketch folder:
- OS X:
~/Documents/Arduino
- Linux:
~/Arduino
- Windows:
~/Documents/Arduino
- Create the following directories:
tools/nRF5FlashSoftDevice/tool/
- Download nRF5FlashSoftDevice.jar to
<SKETCHBOOK>/tools/nRF5FlashSoftDevice/tool/
- Restart the Arduino IDE
- Select your nRF board from the Tools -> Board menu
- Select a SoftDevice from the Tools -> "SoftDevice: " menu
- Select a Programmer (J-Link, ST-Link V2, or CMSIS-DAP) from the Tools -> "Programmer: " menu
- Select Tools -> nRF5 Flash SoftDevice
- Read license agreement
- Click "Accept" to accept license and continue, or "Decline" to decline and abort
- If accepted, SoftDevice binary will be flashed to the board
From git (for core development)
- Follow steps from Board Manager section above
cd <SKETCHBOOK>
, where<SKETCHBOOK>
is your Arduino Sketch folder:
- OS X:
~/Documents/Arduino
- Linux:
~/Arduino
- Windows:
~/Documents/Arduino
- Create a folder named
hardware
, if it does not exist, and change directories to it - Clone this repo:
git clone https://github.com/sandeepmistry/arduino-nRF5.git sandeepmistry/nRF5
- Restart the Arduino IDE
Credits
This core is based on the Arduino SAMD Core and licensed under the same GPL License
The following tools are used:
- GCC ARM Embedded as the compiler
- A forked version of OpenOCD to flash sketches