Skip to content

Commit db6191b

Browse files
committed
Merge branch 'master' of github.com:microbuilder/IntroToBLE
Conflicts: nRF51822/projects/uartservice/btle.c nRF51822/projects/uartservice/main.c
2 parents b18d278 + d8f15a1 commit db6191b

24 files changed

+1026
-927
lines changed

nRF51822/README.md

+33-22
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,47 @@ Mandatory Tools
1515

1616
The following tools are required regardless of the toolchain you are using (GNU Tools or Keil uVision):
1717

18-
- [Segger J-Link Drivers (v4.80 for example)](http://www.segger.com/jlink-software.html)
19-
- **S110 SoftDevice** (v5.2.1) (available after registering your nRF51822 board on [Nordic's website](http://www.nordicsemi.com/))
20-
21-
Downloaded and install the J-Link drivers if you don't already have a recent copy installed, and then download the S110 SoftDevice, which will be placed in an appropriate folder in this codebase (see below for the exact location).
22-
23-
Optional Tools
24-
--------------
25-
18+
- [Segger J-Link Drivers](http://www.segger.com/jlink-software.html)
2619
- The **nRF51822 SDK** (available after registering your nRF51822 board on [Nordic's website](http://www.nordicsemi.com/))
20+
- **S110 SoftDevice** (v6.0.0) (available after registering your nRF51822 board on [Nordic's website](http://www.nordicsemi.com/))
2721

28-
The nRF51822 SDK is only mandatory if you want to use Keil uVision, since it includes support files for Keil (v4.xx only, v5.xx is not yet supported).
29-
30-
If you only plan on using GNU tool and the GNU/GCC toolchain this is an optional download since we have already included a copy of the SDK in the codebase. The SDK also includes the **nrfjprog.exe** utility which allows you to program the flash from the command-line, but this utility has also been included in the codebase at '/tools/Windows/nordic'.
31-
32-
If you do install the SDK, **be sure to use the Windows installer for this rather than the .zip file**, since there are several steps in the installation process that aren't handled by the .zip file!
22+
**Be sure to use the Windows installer for the SDK rather than the .zip file**, since there are several steps in the installation process that aren't handled by the .zip file!
3323

3424
Installation Order
3525
------------------
3626

3727
You **MUST** install the J-Link drivers **BEFORE** installing the nRF51822 SDK or you will have problems with path locations looking for the JLinkARM.dll when using the nrfjprog.exe utility! This utility uses the J-Link .dll, and is required to program the flash from the command-line. If you run into this problem, try uninstalling the SDK, reinstall the J-Link drivers and then re-install the Nordic SDK.
3828

39-
Adding the SoftDevice to the Codebase
40-
-------------------------------------
29+
Optional Tools
30+
--------------
31+
32+
This codebase includes the **nrfjprog.exe** utility from Nordic (/tools/Windows/nordic) which allows you to program the flash from the command-line.
33+
34+
Adding the SoftDevice and SDK to the Codebase
35+
---------------------------------------------
4136

42-
The SoftDevice must be unzipped an placed in the /lib/softdevice/* folder, and shown below. This allows multiple versions of the SoftDevice to co-exist in the codebase, and each Makefile can point to the appropriate header files for the softdevice used by that project:
37+
The SoftDevice must be unzipped and placed in the /lib/softdevice/* folder, and shown below. This allows multiple versions of the SoftDevice to co-exist in the codebase, and each Makefile can point to the appropriate header files for the softdevice used by that project:
4338

4439
```
45-
[projfolder]/lib/softdevice/s110_nrf51822_5.2.1/s110_nrf51822_5.2.1_softdevice.hex
40+
[projfolder]/lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex
4641
```
4742

4843
Make sure that you also include the matching SoftDevice header files, which will normally go in the folder below:
4944

5045
```
51-
[projfolder]/lib/softdevice/s110_nrf51822_5.2.1/s110_nrf51822_5.2.1/s110_nrf51822_5.2.1_API/include
46+
[projfolder]/lib/softdevice/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_API/include
47+
```
48+
49+
Similarly, the SDK files must be placed in the following folder, which allows you to maintain several versions of the SDK across different projects if necessary:
50+
51+
```
52+
[projfolder]/lib/sdk/nRF51_SDK_v5.1.0.36092/s110_nrf51822_6.0.0_softdevice.hex
53+
```
54+
55+
The makefiles are located in the following folder, and reference makefiles are included in the default codebase as a reference. You will probably want to replace the default files in this folder from Nordic with the updated versions provided in this codbase:
56+
57+
```
58+
[projfolder]/lib/sdk/nRF51_SDK_v5.1.0.36092/Nordic/nrf51822/Source/templates/gcc
5259
```
5360

5461
GNU Build Tools
@@ -57,13 +64,17 @@ GNU Build Tools
5764
If you don't already have a valid GNU toolchain and/or supporting build tools installed (make, etc.), we recommend using the following tools with the nRF51822 on Windows:
5865

5966
- [GNU Tools for ARM Embedded Processors 4.8-2013-q4](https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major)
60-
- [Coreutils for Windows 5.3.0](http://gnuwin32.sourceforge.net/packages/coreutils.htm)
61-
- [Make for Windows 3.81](http://gnuwin32.sourceforge.net/packages/make.htm)
67+
- [Coreutils for Windows 5.3.0*](http://gnuwin32.sourceforge.net/packages/coreutils.htm)
68+
- [Make for Windows 3.81*](http://gnuwin32.sourceforge.net/packages/make.htm)
69+
70+
*IMPORTANT NOTE*: When installing 'GNU Tools for ARM Embedded Processors', be sure to install the toolchain in a folder *that doesn't contain any spaces or special characters*. This is important to avoid problems with the makefiles and compilation process. For example, you might want to consider installing everything in 'C:\ARM\4.8_2013q4'.
71+
72+
*You can also try a package like [mingw](http://www.mingw.org/) to provide the required build tools on Windows.
6273

6374
Adding GNU Build Tools to %PATH%
6475
--------------------------------
6576

66-
To access the above tools once they are installed, you need to add the installation folder to the %PATH% environment variable.
77+
To access the above tools once they are installed, you need to add the installation folder to the %PATH% environment variable.
6778

6879
Depending on your system and installation folder, the location that you need to add to %PATH% should resemble the following:
6980

@@ -81,7 +92,7 @@ This file needs to be updated with the folder where you installed the GNU ARM to
8192
If you used the toolchain mentionned above, your config settings should resemble the following values:
8293

8394
```
84-
GNU_INSTALL_ROOT := C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2013q4/
95+
GNU_INSTALL_ROOT := C:/ARM/4.8_2013q4
8596
GNU_VERSION := 4.8.3
8697
GNU_PREFIX := arm-none-eabi
8798
```

nRF51822/lib/sdk/nRF51_SDK_v5.1.0.36092/Nordic/nrf51822/Source/templates/gcc/Makefile.windows

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GNU_INSTALL_ROOT := C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2013q4/
1+
GNU_INSTALL_ROOT := C:/ARM/4.8_2013q4
22
GNU_VERSION := 4.8.3
33
GNU_PREFIX := arm-none-eabi
44

nRF51822/projects/customservice/boards/board.h nRF51822/projects/uartservice/boards/board.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
extern "C" {
1919
#endif
2020

21-
#include "common.h"
21+
#include "projectconfig.h"
22+
#include "common/common.h"
2223

2324
#include "nrf_gpio.h"
2425
#include "app_timer.h"

0 commit comments

Comments
 (0)