Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 37 Next »

1. Overview

The instruction below explains how to prepare a Linux host and build the Zephyr BSP and application for the Emcraft Thingy-9151-Lite platform.

References:

2. Preparing Host

2.1. Installing the nRF Connect SDK

Set up the nRF Connect SDK on a Linux PC as described in the Nordic documentation for the corresponding version. The instruction for v2.5.1 nRF Connect SDK can be found here:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/installation/installing.html

Note that Emcraft maintains the fork of the nRF Connect SDK on GitHub:

https://github.com/voxelbotics/sdk-nrf

Adjust the west init command to get the branch or release tag specified in the Release Notes document, for example:

west init -m https://github.com/voxelbotics/sdk-nrf --mr voxelbotics-v2.5.1-branch

The Emcraft fork has a slightly modified manifest file

https://github.com/voxelbotics/sdk-nrf/blob/voxelbotics-v2.5.1-branch/west.yml

that refers to the Emcraft fork of the Zephyr source code on GitHub:

https://github.com/voxelbotics/sdk-zephyr

2.2. Getting the Source Code of the Thingy-9151-Lite Application

The Thingy-9151-Lite Zephyr application is maintained in the separate GitHub repository:

https://github.com/voxelbotics/nrf-app

Just clone it in the same directory where west was initialized:

git clone git@github.com:voxelbotics/nrf-app -b main

The current branch and release tag are specified in the Release Notes document.

https://github.com/voxelbotics/nrf-app/blob/main/thingy9151lite_nrf5340_cpunet_app/boards/nrf5340dk_nrf5340_cpunet.overlay

3. Building Zephyr Software

3.1. Understanding Application Specific Configuration

Every application directory contains the config.h header file with various configuration parameters specific to the application.

During the nightly and release build, Buildbot adjusts some parameters, including the software version, the software build number and type (either debug or release):

/* The software version: major / minor / build number */
#define CONFIG_VERSION_MAJOR    2
#define CONFIG_VERSION_MINOR    4
/* The software build number and type (debug / release) */
#define CONFIG_BUILD_NUMBER     1
#define CONFIG_BUILD_DEBUG      1

Both debug and release images are created on every build (with different CONFIG_BUILD_DEBUG settings).

3.2. Understanding Automated Build

Emcraft maintains the Buildbot based automated build of the Thingy-9151-Lite Application, which is triggered by every change in the application repository. The subscribers receive an email from the Buildbot containing the references to the pre-built application binaries that can be downloaded from a cloud, for example:

Build status:

  • SUCCESS

Tag/Revision:

98.98-19 / fb2a8ca38312ed8acf7048c8656fb1cf8c91e62c

Steps:

0: worker_preparation

  • SUCCESS

1: Evaluate release tag

  • SUCCESS

2: Owners

  • SUCCESS

3: Upload ssh key

  • SUCCESS

4: Checkout build scripts

  • SUCCESS

5: Build firmware

  • SUCCESS

Files:

Image #1: thingy9151lite_nrf9151_app_on_nrf9161dk_v98.98-19-05212235_release.hex

Image #2: thingy9151lite_nrf9151_app_on_nrf9161dk_v98.98-19-05212235_debug.hex

Image #3: thingy9151lite_nrf5340_cpuapp_app_on_nrf5340dk_v98.98-19-05212235_release.hex

Image #4: thingy9151lite_nrf5340_cpuapp_app_on_nrf5340dk_v98.98-19-05212235_debug.hex

Image #5: thingy9151lite_nrf5340_cpunet_app_on_nrf5340dk_v98.98-19-05212235_release.hex

Image #6: thingy9151lite_nrf5340_cpunet_app_on_nrf5340dk_v98.98-19-05212235_debug.hex

Note that both debug (CONFIG_BUILD_DEBUG=1) and release (CONFIG_BUILD_DEBUG=0) images are generated for each application/board pair.

3.3. Building Thingy-9151-Lite Application for nRF9151/nRF9161

Go to the application directory:

cd nrf-app/thingy9151lite_nrf9151_app/

The boards subdirectory contains the configurations of the supported boards. The Nordic nRF9161 DK board is already supported in Zephyr, so it is configured using the devicetree overlay:

https://github.com/voxelbotics/nrf-app/blob/main/thingy9151lite_nrf9151_app/boards/nrf9161dk_nrf9161_ns.overlay

Build the application for nRF9161 DK using the following command:

west build -b nrf9161dk_nrf9161_ns

The resulting image is build/zephyr/merged.hex.

3.4. Building Thingy-9151-Lite Application for nRF5340 (application core)

Go to the application directory:

cd nrf-app/thingy9151lite_nrf5340_cpuapp_app/

The boards subdirectory contains the configurations of the supported boards. The Nordic nRF5340 DK board is already supported in Zephyr, so it is configured using the devicetree overlay:

https://github.com/voxelbotics/nrf-app/blob/main/thingy9151lite_nrf5340_cpuapp_app/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay

Build the application for nRF5340 DK using the following command:

west build -b nrf5340dk_nrf5340_cpuapp_ns

The resulting image is build/zephyr/merged.hex.

3.5. Building Thingy-9151-Lite Application for nRF5340 DK (network core)

Go to the application directory:

cd nrf-app/thingy9151lite_nrf5340_cpunet_app/

The boards subdirectory contains the configurations of the supported boards. The Nordic nRF5340 DK board is already supported in Zephyr, so it is configured using the devicetree overlay:

https://github.com/voxelbotics/nrf-app/blob/main/thingy9151lite_nrf5340_cpunet_app/boards/nrf5340dk_nrf5340_cpunet.overlay

Build the application for nRF5340 DK using the following command:

west build -b nrf5340dk_nrf5340_cpunet

The resulting image is build/zephyr/zephyr.hex.

  • No labels