Building SOM-NRF9151 Software
1. Overview
The instruction below explains how to prepare a Linux host and build the Zephyr BSP and application for the Emcraft SOM-NRF9151 platform.
References:
2. Preparing Host
The application and nRF Connect SDK URLs are available as follows:
Mcuboot - GitHub - EmcraftSystems/sdk-mcuboot
Zephyr RTOS - GitHub - EmcraftSystems/sdk-zephyr
SOM-NRF9151 application repository - https://github.com/EmcraftSystems/som-nrf9151-app
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.8.0 nRF Connect SDK can be found here:
Note that Emcraft maintains forks of the nRF Connect SDK and Zephyr OS on GitHub, where additional improvements are made for the nRF91xx and nRF5340 devices:
Understanding Zephyr BSP for SOM-NRF9151 | 2. Customized nRF Connect SDK
In order to use the Emcraft SDK and Zephyr forks, adjust the SDK initialization command from the SDK installation document as follows:
west init -m https://github.com/EmcraftSystems/sdk-nrf --mr emcraft-v2.8.0-branch
west update
The actual branch or release tag for the above command can be found in the up-to-date Release Notes document:
2.2. Getting the Source Code of the SOM-NRF9151 Application
The SOM-NRF9151 Zephyr application is maintained in the separate GitHub repository:
https://github.com/EmcraftSystems/som-nrf9151-app
Clone it in the same directory where west
was initialized:
git clone git@github.com:EmcraftSystems/som-nrf9151-app.git -b main
The current branch and release tag are specified in the last Release Notes document:
3. Building Zephyr Software
3.1. Understanding Application Version and Build Type
During the nightly and release build, Buildbot
adjusts the application version and build type (either debug or release) in the prj.conf
file:
# Version
CONFIG_APP_VERSION="0.0-0-debug"
CONFIG_APP_VERSION_DEBUG=y
Both debug and release images are created on every build (with different CONFIG_APP_VERSION_DEBUG
settings).
3.2. Understanding Automated Build
Emcraft maintains the Buildbot
based automated build of the SOM-NRF9151 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: |
|
Tag/Revision: | 98.98-12 / cca7ddffe272797acafb0a4dfb5e0d887b801ccb |
Steps: |
|
0: worker_preparation |
|
1: Evaluate release tag |
|
2: Owners |
|
3: Upload |
|
4: Checkout build scripts |
|
5: Build firmware |
|
Files: |
|
Image #1: asset_tracker_v2_on_nrf9151som_v98.98-12-01171742_release.hex | |
Image #2: asset_tracker_v2_on_nrf9151som_v98.98-12-01171742_debug.hex |
Note that both debug (CONFIG_APP_VERSION_DEBUG=y
) and release (CONFIG_APP_VERSION_DEBUG=n
) images are generated for every application.
3.3. Building SOM-NRF9151 Application for nRF9151
Go to the application directory:
cd som-nrf9151-app/asset_tracker_v2/
The SOM-NRF9151 board uses an out-of-tree board configuration, since it is not supported in Zephyr:
Understanding Zephyr BSP for SOM-NRF9151 | 3.1. SOM NRF9151 Board Configuration
Build the application for the nRF9151 on the SOM-NRF9151 using the following command:
west build -b nrf9151som/nrf9151/ns
The resultant image is build/merged.hex
.