Skip to content

Commit a111322

Browse files
authored
Merge branch 'master' into master
2 parents 0c00260 + 5d9ca8e commit a111322

File tree

707 files changed

+213248
-96548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

707 files changed

+213248
-96548
lines changed

.github/issue_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Thank you for using Adafruit project and libraries,
2+
please review the following guidelines before creating an issue :
3+
4+
- **Do not use GitHub issues for question or troubleshooting projects.** Instead use
5+
the forums at http://forums.adafruit.com. Only create issue if it is a bug, feature
6+
or discussion that requires **code changes to resolve**.
7+
8+
- **Check our tutorial and examples** There is chance that our
9+
[learn tutorial](https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/introduction)
10+
and examples has useful information for you.
11+
12+
- Please provide details that help us to reproduce your issue
13+
14+
- Your Board and BSP version
15+
- Your OS (mac/windows/linux) and its version
16+
- Steps to reproduce, or better your (simplified) sketch if possible
17+
- Serial debug log (enable IDE's Debug Mode Level to 1 or 2)

.gitmodules

Whitespace-only changes.

.project

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Adafruit_nRF52_Arduino</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.core.ccnature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
</natures>
27+
<linkedResources>
28+
<link>
29+
<name>arduino-libraries</name>
30+
<type>2</type>
31+
<location>/home/hathach/Arduino/libraries</location>
32+
</link>
33+
</linkedResources>
34+
<filteredResources>
35+
<filter>
36+
<id>1498710934502</id>
37+
<name></name>
38+
<type>22</type>
39+
<matcher>
40+
<id>org.eclipse.ui.ide.multiFilter</id>
41+
<arguments>1.0-name-matches-false-false-*.o</arguments>
42+
</matcher>
43+
</filter>
44+
<filter>
45+
<id>1498710934507</id>
46+
<name></name>
47+
<type>22</type>
48+
<matcher>
49+
<id>org.eclipse.ui.ide.multiFilter</id>
50+
<arguments>1.0-name-matches-false-false-*.d</arguments>
51+
</matcher>
52+
</filter>
53+
<filter>
54+
<id>1498710934515</id>
55+
<name></name>
56+
<type>6</type>
57+
<matcher>
58+
<id>org.eclipse.ui.ide.multiFilter</id>
59+
<arguments>1.0-name-matches-false-false-*.pyc</arguments>
60+
</matcher>
61+
</filter>
62+
<filter>
63+
<id>1498710934520</id>
64+
<name></name>
65+
<type>22</type>
66+
<matcher>
67+
<id>org.eclipse.ui.ide.multiFilter</id>
68+
<arguments>1.0-name-matches-false-false-*.so</arguments>
69+
</matcher>
70+
</filter>
71+
</filteredResources>
72+
</projectDescription>

README.md

Lines changed: 60 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Arduino Core for Adafruit nRF52 Feather Boards
1+
# Arduino Core for Adafruit Bluefruit nRF52 Boards
2+
3+
This repository contains the Arduino BSP for Adafruit nRF52 series:
4+
5+
- [Bluefruit Feather nRF52832](https://www.adafruit.com/product/3406)
6+
- [Bluefruit Feather nRF52840](https://www.adafruit.com/product/4062)
7+
- [Noric nRF52840DK PCA10056](https://www.nordicsemi.com/eng/Products/nRF52840-DK)
28

39
## BSP Installation
410

@@ -18,36 +24,32 @@ There are two methods that you can use to install this BSP. We highly recommend
1824

1925
1. Install BSP via Board Manager as above to install compiler & tools.
2026
2. Delete the core folder `nrf52` installed by Board Manager in Adruino15, depending on your OS. It could be
21-
* OS X : `~/Library/Arduino15/packages/adafruit/hardware/nrf52`
27+
* macOS : `~/Library/Arduino15/packages/adafruit/hardware/nrf52`
2228
* Linux : `~/.arduino15/packages/adafruit/hardware/nrf52`
2329
* Windows: `%APPDATA%\Local\Arduino15\packages\adafruit\hardware\nrf52`
24-
3. ```cd <SKETCHBOOK>```, where ```<SKETCHBOOK>``` is your Arduino Sketch folder:
25-
* OS X : ```~/Documents/Arduino```
26-
* Linux : ```~/Arduino```
27-
* Windows: ```~/Documents/Arduino```
28-
4. Create a folder named ```hardware/Adafruit```, if it does not exist, and change directories to it
29-
5. Clone this repo: `git clone git@github.com:adafruit/Adafruit_nRF52_Arduino.git`
30+
3. `cd <SKETCHBOOK>`, where `<SKETCHBOOK>` is your Arduino Sketch folder:
31+
* macOS : `~/Documents/Arduino`
32+
* Linux : `~/Arduino`
33+
* Windows: `~/Documents/Arduino`
34+
4. Create a folder named `hardware/Adafruit`, if it does not exist, and change directories to it
35+
5. Clone this repo: `git clone https://github.com/adafruit/Adafruit_nRF52_Arduino.git`
3036
6. Restart the Arduino IDE
3137
7. 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.
3238

33-
### Third Party Tools
39+
### Adafruit's nrfutil tools
3440

35-
#### nrfutil
41+
[adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) (derived from Nordic pc-nrfutil) is needed to upload sketch via serial port.
3642

37-
The Adafruit nRF52 BSP includes a [python wrapper](https://github.com/NordicSemiconductor/pc-nrfutil)
38-
for Nordic's `nrfutil`, which is used to flash boards. Go into the BSP folder
39-
(`hardware/Adafruit/Adafruit_nRF52_Arduino/tools/nrfutil-0.5.2`), and run the following to make
40-
this available to the Arduino IDE:
43+
- For Windows and macOS, pre-built executable binaries are included in the BSP at `tools/adafruit-nrfutil/`. It should work out of the box.
44+
- Linux user need to run follow command to install it from PyPi
4145

42-
```
43-
$ cd tools/nrfutil-0.5.2
44-
$ sudo pip install -r requirements.txt
45-
$ sudo python setup.py install
46-
```
46+
```
47+
$ pip3 install adafruit-nrfutil --user
48+
```
49+
50+
### Drivers
4751
48-
**Notes** : Don't install nrfutil from the pip package (ex. `sudo pip install nrfutil`). The
49-
latest nrfutil does not support DFU via Serial, and you should install the local copy of 0.5.2
50-
included with the BSP via the `python setup.py install` command above.
52+
- [SiLabs CP2104 driver](http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx) is required for USB to Serial when using with Feather nRF52832
5153
5254
## Arduino BLE Application Support
5355
@@ -63,52 +65,57 @@ examples sketched for the selected board.
6365
6466
## Bootloader Support
6567
66-
### Third Party Tools
68+
### Upgrade existing Bootloader
69+
70+
Bluefruit's Bootloader is self-upgradable, you could upgrade to the latest Bootloader + Softdevice using the serial port within Arduino IDE.
71+
72+
- Select `Tools > Board > Adafruit Bluefruit Feather52`
73+
- Select `Tools > Programmer > Bootloader DFU for Bluefruit nRF52`
74+
- Select `Tools > Burn Bootloader`
75+
- **WAIT** until the process complete ~30 seconds
76+
77+
Note: close the Serial Monitor before you click "Burn Bootloader". Afterwards, you shouldn't close the Arduino IDE, unplug the Feather, launch Serial Monitor etc ... to abort the process. There is a high chance it will brick your device! Do this with care and caution.
78+
79+
### Burning new Bootloader
6780
6881
To burn the bootloader from within the Arduino IDE, you will need the following tools installed
6982
on your system and available in the system path:
7083
71-
#### Jlink Driver and Tools
84+
- Segger [JLink Software and Documentation Pack](https://www.segger.com/downloads/jlink)
85+
- Nordic [nRF5x Command Line Tools](http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.tools%2Fdita%2Ftools%2Fnrf5x_command_line_tools%2Fnrf5x_installation.html)
86+
87+
Check to make sure you can run `nrfjprog` from your terminal/command prompt
7288
73-
Download and install the [JLink Software and Documentation Pack](https://www.segger.com/downloads/jlink)
74-
from Segger, which will also install a set of command line tools.
89+
**macOS Note** At present, you will need to create a symlink in `/usr/local/bin` to the
90+
`nrfjprog` tool wherever you have added it. You can run the following command, for example:
7591
76-
### Burning the Bootloader
92+
```
93+
$ ln -s $HOME/prog/nordic/nrfjprog/nrfjprog /usr/local/bin/nrfjprog
94+
```
7795
7896
Once the tools above have been installed and added to your system path, from the Arduino IDE:
7997
8098
- Select `Tools > Board > Adafruit Bluefruit Feather52`
8199
- Select `Tools > Programmer > J-Link for Feather52`
82100
- Select `Tools > Burn Bootloader` with the board and J-Link connected
83101
84-
#### Manually Burning the Bootloader via nrfjprog
85-
86-
You can also manually burn the bootloader from the command line, you will need `nrfjprog` from Nordic:
87-
88-
- Download [nRF5x-Command-Line-Tools](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832#Downloads) for OSX/Linux/Win32
89-
- Extract the downloaded file and add the extracted path to your environment `PATH` variable
90-
- Check to make sure you can run `nrfjprog` from your terminal/command prompt
102+
If you wish to modify bootloader to your own need, check out its repo here [Adafruit_nRF52_Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader)
91103
92-
**OS X Note** At present, you will need to create a symlink in `/usr/local/bin` to the
93-
`nrfjprog` tool wherever you have added it. You can run the following command, for example:
94-
95-
```
96-
$ ln -s $HOME/prog/nordic/nrfjprog/nrfjprog /usr/local/bin/nrfjprog
97-
```
104+
#### Manually Burning the Bootloader via nrfjprog
98105
99-
Then run the command as follows:
106+
The bootloader hex file can be found at `bin/bootloader` run the command as follows:
100107
101108
```
102109
$ nrfjprog -e -f nrf52
103-
$ nrfjprog --program bootloader_with_s132.hex -f nrf52
110+
$ nrfjprog --program feather_nrf52832_bootloader.hex -f nrf52
104111
$ nrfjprog --reset -f nrf52
105112
```
106113
107114
## Misc Notes
108115
109-
#### nRF52DK Jlink Issue on OS X
116+
#### nRF52DK Jlink Issue on macOS
110117
111-
If developping with the nRF52DK on OS X, there is a bug where only 64 bytes can be sent
118+
If developing with the nRF52DK on macOS, there is a bug where only 64 bytes can be sent
112119
over the USB CDC interface, which will prevent you from using the serial bootloader from
113120
the Arduino IDE with an error like this:
114121
@@ -128,7 +135,7 @@ Possible causes:
128135
129136
To resolve this and enable 512 byte packets over USB serial, you must disable the
130137
Mass Storage Device interface on the JLink-OB, which will free up two of the 512 byte
131-
USB end points. (For details see [this article](https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U).)
138+
USB end points. (For details see [this article](https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U).)
132139
133140
You can do so by running `JLinkExe` from the command line, and then entering the
134141
`MSDDisable` command, and power cycling your nRF52DK. To re-enable MSD support, do the same
@@ -139,6 +146,12 @@ but enter the `MSDEnable` command.
139146
This core is based on [Arduino-nRF5](https://github.com/sandeepmistry/arduino-nRF5) by Sandeep Mistry,
140147
which in turn is based on the [Arduino SAMD Core](https://github.com/arduino/ArduinoCore-samd).
141148
142-
The following tools are used:
149+
The following libraries are used:
143150
144-
* [GCC ARM Embedded](https://launchpad.net/gcc-arm-embedded) as the compiler
151+
- adafruit-nrfutil is based on Nordic Semiconductor ASA's [pc-nrfutil](https://github.com/NordicSemiconductor/pc-nrfutil)
152+
- [freeRTOS](https://www.freertos.org/) as operating system
153+
- [tinyusb](https://github.com/hathach/tinyusb) as usb stack
154+
- [nrfx](https://github.com/NordicSemiconductor/nrfx) for peripherals driver
155+
- [littlefs](https://github.com/ARMmbed/littlefs) for internal file system
156+
- [fatfs by elm-chan](http://elm-chan.org/fsw/ff/00index_e.html) for external file system
157+
- Segger Sysview for debugging.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)