Skip to content

Commit a43c064

Browse files
committed
Update bootloader/jlink upload
Former-commit-id: 88bb957
1 parent ccc8cea commit a43c064

File tree

8 files changed

+346
-89
lines changed

8 files changed

+346
-89
lines changed

README.md

Lines changed: 93 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
An Arduino Core for ARM based BLE boards supported by the NimBLE stack.
44

5-
**This core is currently still in development and not yet available through the Arduino board manager. Manual installation, described below, is required to use this core.**
6-
75
If you are interested in assisting the development of this project please submit issues and PR's. Or become a collaborator!
86

97
## Features
@@ -12,65 +10,117 @@ If you are interested in assisting the development of this project please submit
1210
* No softdevice, NimBLE provides a complete BLE stack.
1311
* Contains a subset of the EEPROM library to support basic config storage in flash.
1412
* Supports `printf` and `Serial.printf`
15-
* Uses FreeRTOS.
13+
* Uses/includes FreeRTOS.
1614
* Designed to maximize battery life using tickless idle. This allows the MCU to sleep any time `delay` is called.
1715
* Custom configuration of FreeRTOS and NimBLE compile options supported by providing a `build_opt.h` file in your sketch.
1816

19-
## Why do this?
17+
## Why?
2018

2119
I wanted to have a consistent BLE API on all of the devices I work with. NimBLE is the best choice for this as it is the most feature complete and fully open source library available for Arduino.
2220

23-
## BLE
24-
25-
This Arduino Core does **not** contain any BLE functionality. It has been designed to support using the [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino) library for BLE operation.
26-
**Note:** Currently only the master branch of NimBLE-Arduino supports Arm devices and no releases have been made yet with Arm support.
27-
28-
## Installation
29-
30-
1. Go to your Arduino folder:
21+
## Supported boards
22+
23+
### nRF52840
24+
* [Generic nRF52840 MCU](https://www.nordicsemi.com/Products/nRF52840)
25+
* [Nordic nRF52840 DK](https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK)
26+
* [Nordic nRF52840 Dongle](https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle)
27+
* [Adafruit CLUE nRF52840](https://www.adafruit.com/product/4500)
28+
* [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
29+
* [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
30+
* [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516)
31+
* [Adafruit ItsyBitsy nRF52840 Express](https://www.adafruit.com/product/4481)
32+
* [Ebyte E104-BT5040U](https://www.ebyte.com/en/product-view-news.html?id=1185)
33+
34+
### nRF52833
35+
* [Generic nRF52833 MCU](https://www.nordicsemi.com/Products/nRF52833)
36+
* [Nordic nRF52833 DK](https://www.nordicsemi.com/Products/Development-hardware/nRF52833-DK)
37+
* [BBC micro:bit v2](https://microbit.org/new-microbit/)
38+
39+
### nRF52832
40+
* [Generic nRF52832 MCU](https://www.nordicsemi.com/Products/nRF52832)
41+
* [Nordic nRF52832 DK](https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52-DK)
42+
* [RedBear Blend 2](https://github.com/redbear/nRF5x#blend-2)
43+
* [RedBear Nano 2](https://github.com/redbear/nRF5x#ble-nano-2)
44+
* [Bluey](https://github.com/electronut/ElectronutLabs-bluey)
45+
* [hackaBLE](https://github.com/electronut/ElectronutLabs-hackaBLE)
46+
* [hackaBLE_v2](https://github.com/electronut/ElectronutLabs-hackaBLE)
47+
* [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406)
48+
* [Ebyte E104-BT5032A-TB](https://www.ebyte.com/en/product-view-news.html?id=956)
49+
50+
### nRF51
51+
* [Generic nRF51 MCU](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822)
52+
* [BBC micro:bit](https://microbit.org)
53+
* [Calliope mini](https://calliope.cc/en)
54+
* [Bluz DK](http://bluz.io)
55+
* Nordic Semiconductor [nRF51822 Development Kit](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Development-Kit)
56+
* [Nordic Semiconductor NRF51 Smart Beacon Kit](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Bluetooth-Smart-Beacon-Kit)
57+
* [Nordic Semiconductor NRF51 Dongle](http://www.nordicsemi.com/eng/Products/nRF51-Dongle)
58+
* [OSHChip](http://www.oshchip.org/)
59+
* [RedBearLab BLE Nano](http://redbearlab.com/blenano/)
60+
* [RedBearLab nRF51822](http://redbearlab.com/redbearlab-nrf51822/)
61+
* [Waveshare BLE400](http://www.waveshare.com/wiki/BLE400)
62+
* [ng-beacon](https://github.com/urish/ng-beacon)
63+
* [TinyBLE](https://www.seeedstudio.com/Seeed-Tiny-BLE-BLE-%2B-6DOF-Mbed-Platform-p-2268.html)
64+
* [Sino:bit](http://sinobit.org)
65+
66+
## Installing
67+
68+
### Board Manager
69+
70+
1. [Download and install the Arduino IDE](https://www.arduino.cc/en/Main/Software) (At least v1.6.12)
71+
2. Start the Arduino IDE
72+
3. Go into Preferences
73+
4. Add ```https://h2zero.github.io/n-able-Arduino/package_n-able_boards_index.json``` as an "Additional Board Manager URL"
74+
5. Open the Boards Manager from the Tools -> Board menu and install "Arm BLE Boards"
75+
6. Select your board from the Tools -> Board menu
76+
77+
### From git (for core development)
78+
79+
1. Follow steps from Board Manager section above
80+
2. ```cd <SKETCHBOOK>```, where ```<SKETCHBOOK>``` is your Arduino Sketch folder:
3181
* OS X: ```~/Documents/Arduino```
3282
* Linux: ```~/Arduino```
3383
* Windows: ```~/Documents/Arduino```
34-
2. Create a folder named ```hardware```, if it does not exist, and change directories to it
35-
3. Clone this repo: ```git clone https://github.com/h2zero/n-able.git n-able/arm-ble```
36-
4. Download the tools: (these need to be manually downloaded/installed for now)
37-
* GCC:
38-
* [OS X](https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-mac.tar.bz2?revision=d0d318de-b746-489f-98b0-9d89648ce910&hash=601DBEFBB7540F434D54B7BFF7890875)
39-
* [Linux](https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&hash=AE874AE7513FAE5077350E4E23B1AC08)
40-
* [Windows](https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-win32.zip?revision=95631fd0-0c29-41f4-8d0c-3702650bdd74&hash=1223A90FC1ACF69AD82680A87E0AEDD0)
41-
* OpenOCD:
42-
* [OS X](https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.11.0-1/xpack-openocd-0.11.0-1-darwin-x64.tar.gz)
43-
* [Linux](https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.11.0-1/xpack-openocd-0.11.0-1-linux-x64.tar.gz)
44-
* [Windows](https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.11.0-1/xpack-openocd-0.11.0-1-win32-x64.zip)
45-
5. Extract OpenOCD and copy the contents to ```<ARDUINO_FOLDER>/hardware/n-able/arm-ble/tools/openocd```
46-
6. Extract GCC and copy the contents to ```<ARDUINO_FOLDER>/hardware/n-able/arm-ble/tools/gcc-arm-none-eabi/9_0_2020q2```
47-
7. Restart the Arduino IDE
48-
49-
### Driver Setup for Segger J-Link
50-
51-
1. Download [Zadig](http://zadig.akeo.ie)
52-
2. Plugin Segger J-Link or DK board
53-
3. Start ```Zadig```
54-
4. Select ```Options -> List All Devices```
55-
5. Plug and unplug your device to find what changes, and select the ```Interface 2``` from the device dropdown
56-
6. Click ```Replace Driver```
57-
58-
__NOTE__: To roll back to the original driver go to: Device Manager -> Right click on device -> Check box for "Delete the driver software for this device" and click Uninstall
59-
60-
### Flashing your device
84+
3. Create a folder named ```hardware```, if it does not exist, and change directories to it
85+
4. Clone this repo: ```git clone https://github.com/h2zero/n-able-Arduino.git```
86+
5. Restart the Arduino IDE
87+
88+
## Flashing your device
6189

6290
1. Select your board from the Tools -> Board menu
6391
2. Select any options you want
64-
3. Select a programmer (J-Link, ST-Link V2, CMSIS-DAP, or Black Magic Probe) from the Tools -> "Programmer: " menu
92+
3. Select a programmer (J-Link, ST-Link V2, CMSIS-DAP, Black Magic Probe, adafruit-nrfutil or nrfutil) from the Tools -> "Programmer: " menu
6593
4. Connect your programmer to the device and click Upload
6694

67-
**Note:** Currently no bootloader is provided or required.
68-
Instead you will need to erase any bootloader currently installed on your device. To do this, select your board from the board menu and click "Burn Bootloader", this will completely erase the device flash memory.
95+
### Uploading via Segger J-Link
96+
1. Make sure you have [Segger J-Link](https://www.segger.com/downloads/jlink) installed on your system.
97+
2. (For Windows) add the JLink.exe path to your environment variables.
98+
3. Select J-Link as the firmware uploader in the tools menu.
99+
100+
### Uploading via adafruit-nrfutil (for Adafruit bootloader devices only)
101+
1. Install adafruit-nrfutil if not already installed `pip install adafruit-nrfutil`
102+
2. Select adafruit-nrfutil as the firmware uploader in the tools menu.
103+
104+
### Uploading via (Nordic) nrfutil (for Nordic bootloader devices only)
105+
1. Install nrfutil if not already installed `pip install nrfutil`
106+
2. Select nrfutil as the firmware uploader in the tools menu.
107+
108+
## BLE
109+
110+
This Arduino Core does **not** contain any BLE functionality. It has been designed to support using the [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino) library for BLE operation.
111+
**Note:** Currently only the release version 1.4.0 and above of [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino) supports Arm devices.
112+
113+
## Bootloader
114+
Currently only some boards have Adafruit bootloaders available which are provided as options. You may choose to use the bootloader or none.
115+
The provided Adafruit bootloaders have no softdevice, if you currently are using the softdevice based Adafruit bootloader on your nRF52 board you will need to update it to the one provided by selecting it from the boards menu and clicking `Burn Bootloader`.
116+
117+
For boards without the Adafruit bootloader option clicking `Burn Bootloader` will simply erase the flash memory on the device. This is required if you have any bootloader flashed already.
69118

70119
## Credits
71120

72121
This core is based on [Arduino-nRF5](https://github.com/sandeepmistry/arduino-nRF5) by Sandeep Mistry,
73-
which in turn is based on the [Arduino SAMD Core](https://github.com/arduino/ArduinoCore-samd).
122+
which is based on the [Arduino SAMD Core](https://github.com/arduino/ArduinoCore-samd).
123+
With some code from [Adafruit_nRF52_Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino)
74124

75125
The following libraries are used:
76126

0 commit comments

Comments
 (0)