nRF5 SDK for Zigbee is intended for use with the nRF52840 Development Kit.
The SDK provides precompiled ZBOSS libraries for GCC and IAR. The GCC library was built on Linux with arm-none-eabi-gcc version 6.3.1. The IAR libraries were built with IAR Workbench 7.80.2.
Every Zigbee example can be built with various toolchains and IDEs. Currently, the following build methods are provided:
You must install a set of tools to complete the environment setup process.
Make
First, make sure that you have the make
tool installed on your system. To do this, run the following command:
If the command does not provide output, you must install the make
tool. Refer to the documentation of your Linux distribution for information on how to download and install it.
GNU ARM Embedded Toolchain
To be able to compile projects for the nRF52840 Development Kit, you must install the GNU ARM Embedded Toolchain in version 6.3.1. You can download this version from GNU ARM Embedded Toolchain. Make sure to install it in the /usr/local/gcc-arm-none-eabi-6-2017-q2-update
folder.
If you already have another version of arm-none-eabi installed, you can modify the default path in the following file: <InstallFolder>/components/toolchain/gcc/Makefile.posix
.
SEGGER J-Link
To enable communication between devices, you need the SEGGER J-Link utility. You can download the latest version from the J-Link Download page.
nrfjprog
You need the nrfjprog tool to program the nRF52840 chips. The latest version of this tool can be found on the nRF52840 product website.
Make
The make
tool, required to build GCC projects, is not natively available on Windows. However, the MinGW package can be used to install it:
C:\MinGW
C:\MinGW\bin
C:\MinGW\msys\1.0\bin
make
tool was installed correctly by typing make --version
and pressing Enter. If there are no errors during installation, the following message is displayed: To be able to compile projects for the nRF52840 Development Kit, you must install GNU ARM Embedded Toolchain version 6.3.1. You can download this version from GNU ARM Embedded Toolchain. It is recommended to install it in the default directory: C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update
.
If you already have another version of arm-none-eabi installed, or have installed it in a different directory, you can modify the default path in the following file: <InstallFolder>\components\toolchain\gcc\Makefile.windows
.
To communicate with and program the nRF52840 Development Kit, you need the SEGGER J-Link and nrfjprog tools. Download and install the latest version of nRF5x Command Line Tools from the nRF52840 product website. This package includes the latest version of SEGGER J-Link and nrfjprog utilities.
For Windows environment, add nrfjprog installation directory (for example C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin\
) to your system PATH variable after the installation is complete.
Building an example with GCC
To build an example with GCC, perform the following steps:
<InstallFolder>/examples/zigbee/experimental/light_control/light_bulb/pca10056/blank/armgcc
.make
command in this folder. If the environment was set up correctly, the build process will start._build
folder: <InstallFolder>/examples/zigbee/experimental/light_control/light_bulb/pca10056/blank/armgcc/_build/nrf52840_xxaa.hex
. make
command on Windows, make sure that you do not have any other make
instances from other toolsets like Cygwin or GnuWin32 in your PATH variable. Building an example with IAR
To build and example with IAR, perform the following steps:
<InstallFolder>/examples/zigbee/experimental/light_control/light_bulb/zigbee_light_bulb.eww
To program the nRF52840 Development Kit, first connect it to your computer with a USB cable. When your board is detected, you can download the example as described below.
Running an example without the SoftDevice
To program the device, run:
To reset the device, run:
For a list of available nrfjprog commands, run:
Optionally, when using GCC, you can type the following commands:
Running an example with the SoftDevice
The SoftDevice is used by the multiprotocol examples.
To write SoftDevice to the device, run:
To write an application to the device, run:
To reset the device, run:
Optionally, when using GCC, you can type the following commands:
See the following topics for further introduction into Nordic Semiconductor's ZigBee implementation.