You are currently not logged in and your progress will not be saved. Register or Log in

nRF Connect SDK structure and content

nRF Connect SDK is a scalable and unified software development kit for building low-power wireless applications based on the Nordic Semiconductor nRF52, nRF53, and nRF91 Series wireless devices. It offers an extensible framework for building size-optimized software for memory-constrained devices as well as powerful and complex software for more advanced devices and applications.

It integrates Zephyr Real-Time Operating System (RTOS) and a wide range of complete applications, samples, and protocol stacks such as Bluetooth Low Energy, Bluetooth mesh, Thread/Zigbee and LTE-M/NB-IoT/GPS, TCP/IP. It also includes middleware such as CoAP and MQTT, various libraries, hardware drivers, and a secure bootloader (MCUBoot).

Architecture of nRF Connect SDK

Zephyr RTOS is an open-source real-time operating system for connected and resource-constrained embedded devices. It includes a scheduler that ensures predictable/deterministic execution patterns and abstracts out the timing requirements. It also comes with a rich set of fundamental libraries and middleware that simplifies development and helps reduce time to market for the product. Zephyr RTOS is highly configurable and enables scalable configurations from very small configurations for memory-constrained devices (minimum 8 kilobytes, for example, simple LED blinking application) to powerful, feature-rich, high-processing power devices (multiple MBs of memory) with large memory configurations.

nRF Connect SDK offers a single code base for all Nordic’s devices and software components. It simplifies porting modules, libraries, and drivers from one application to another, thus reducing development time. By enabling developers to pick and choose the essential software components for their application, high memory efficiency is guaranteed. The nRF Connect SDK is publicly hosted on GitHub.

Internally, the nRF Connect SDK code is organized into four main repositories:

  • nrf – Application & Connectivity Protocols (Nordic)
  • nrfxlib – Peripheral Drivers and Stacks (Nordic)
  • Zephyr – RTOS & Board configuration (open source)
  • MCUBoot – Secure Bootloader (open source)

The figure below visualizes the toolchain in nRF Connect SDK, which is based on the Zephyr toolchain. You can see a set of different tools, each playing a role in the creation of an application, from configuring the system to building it.

nRF Connect SDK tools and configuration methods

Kconfig (covered in Lesson 3) generates definitions that configure the whole system, for example which wireless protocol or which libraries to use. Devicetree (covered in Lesson 2) describes the hardware. CMake then uses the information from Kconfig and the devicetree to generate build files, which Ninja (comparable to make) will use to build the program. The GCC compiler system is used to create the executables.

This high decoupling of the source code (*.c) and the configuration system through Kconfig (*.conf) and the hardware description system through devicetree (*.dts) makes it easy to use the same application source code on different hardware and with different configurations with minimal changes. This has a huge impact on the ease of portability and maintainability.

Build process for nRF Connect SDK

Now that we have an understanding of the content and structure of the nRF Connect SDK, let’s move to the hands-on part of this lesson where we get to install the nRF Connect SDK through some high-level tools that simplify the process of obtaining the repositories and setting up the needed toolchains.