Skip to content

Commit 33a5326

Browse files
authored
Merge pull request #13 from golioth/merge/template_v2.4.1
Merge/template v2.4.1
2 parents 7842fde + d1d057b commit 33a5326

15 files changed

+314
-36
lines changed

.github/workflows/build_zephyr.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,20 @@ jobs:
6060
6161
- name: Build with West
6262
run: |
63-
west build -p -b ${{ inputs.BOARD }} app
63+
west build -p -b ${{ inputs.BOARD }} --sysbuild app
6464
6565
- name: Prepare artifacts
66+
shell: bash
6667
if: inputs.ARTIFACT == true && inputs.TAG != ''
6768

6869
run: |
69-
cd build/zephyr
70+
cd build
7071
mkdir -p artifacts
71-
mv merged.hex ./artifacts/${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}_full.hex
72-
mv app_update.bin ./artifacts/${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}_update.bin
73-
mv zephyr.elf ./artifacts/${{ github.event.repository.name }}_${{ inputs.TAG }}_${{ inputs.BOARD }}.elf
72+
BOARD_NICENAME=${{ inputs.BOARD }}
73+
BOARD_NICENAME=${BOARD_NICENAME//\//_}
74+
mv merged.hex ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${BOARD_NICENAME}_full.hex
75+
mv app/zephyr/zephyr.signed.bin ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${BOARD_NICENAME}_update.bin
76+
mv app/zephyr/zephyr.elf ./artifacts/golioth-${{ github.event.repository.name }}_${{ inputs.TAG }}_${BOARD_NICENAME}.elf
7477
7578
# Run IDs are unique per repo but are reused on re-runs
7679
- name: Save artifact
@@ -79,4 +82,4 @@ jobs:
7982
with:
8083
name: build_artifacts_${{ github.run_id }}
8184
path: |
82-
build/zephyr/artifacts/*
85+
build/artifacts/*

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
version:
1010
description: 'Release Version.'
1111
required: true
12-
default: 'v0.0.0'
12+
default: 'template_v0.0.0'
1313
type: string
1414

1515
jobs:
1616
build-binaries:
1717
strategy:
1818
matrix:
1919
ZEPHYR_SDK: [0.16.3]
20-
BOARD: ["thingy91_nrf9160_ns"]
20+
BOARD: ["thingy91/nrf9160/ns"]
2121

2222
uses: ./.github/workflows/build_zephyr.yml
2323
with:

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ on:
77
pull_request:
88

99
push:
10+
branches: [ main ]
1011

1112
jobs:
12-
test_build:
13+
test_build_thingy91:
1314
uses: ./.github/workflows/build_zephyr.yml
1415
with:
1516
ZEPHYR_SDK: 0.16.3
16-
BOARD: thingy91_nrf9160_ns
17+
BOARD: thingy91/nrf9160/ns
1718
ARTIFACT: false

README.rst

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
..
2-
Copyright (c) 2022-2023 Golioth, Inc.
2+
Copyright (c) 2024 Golioth, Inc.
33
SPDX-License-Identifier: Apache-2.0
44
55
Golioth Thingy91 Example Program
@@ -16,8 +16,11 @@ This repo is based on the Golioth `Reference Design Template`_.
1616
Local set up
1717
************
1818

19-
Do not clone this repo using git. Zephyr's ``west`` meta tool should be used to
20-
set up your local workspace.
19+
.. pull-quote::
20+
[!IMPORTANT]
21+
22+
Do not clone this repo using git. Zephyr's ``west`` meta tool should be used to
23+
set up your local workspace.
2124

2225
Install the Python virtual environment (recommended)
2326
====================================================
@@ -51,13 +54,19 @@ itself will be inside the ``app`` folder. The ``build`` and ``deps`` directories
5154
being one level higher prevents the repo from cataloging all of the changes to
5255
the dependencies and the build (so no ``.gitignore`` is needed).
5356

54-
Prior to building, update ``CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION`` in the ``prj.conf`` file to
55-
reflect the firmware version number you want to assign to this build. Then run the following
56-
commands to build and program the firmware onto the device.
57+
Prior to building, update ``VERSION`` file to reflect the firmware version number you want to assign
58+
to this build. Then run the following commands to build and program the firmware onto the device.
59+
60+
61+
.. pull-quote::
62+
[!IMPORTANT]
63+
64+
You must perform a pristine build (use ``-p`` or remove the ``build`` directory)
65+
after changing the firmware version number in the ``VERSION`` file for the change to take effect.
5766

5867
.. code-block:: text
5968
60-
$ (.venv) west build -p -b thingy91_nrf9160_ns app
69+
$ (.venv) west build -p -b thingy91/nrf9160/ns --sysbuild app
6170
$ (.venv) west flash
6271
6372
Configure PSK-ID and PSK using the device shell based on your Golioth
@@ -69,6 +78,25 @@ credentials and reboot:
6978
uart:~$ settings set golioth/psk <my-psk>
7079
uart:~$ kernel reboot cold
7180
81+
Add Pipeline to Golioth
82+
***********************
83+
84+
Golioth uses `Pipelines`_ to route stream data. This gives you flexibility to change your data
85+
routing without requiring updated device firmware.
86+
87+
Whenever sending stream data, you must enable a pipeline in your Golioth project to configure how
88+
that data is handled. Add the contents of ``pipelines/cbor-to-lightdb.yml`` as a new pipeline as
89+
follows (note that this is the default pipeline for new projects and may already be present):
90+
91+
1. Navigate to your project on the Golioth web console.
92+
2. Select ``Pipelines`` from the left sidebar and click the ``Create`` button.
93+
3. Give your new pipeline a name and paste the pipeline configuration into the editor.
94+
4. Click the toggle in the bottom right to enable the pipeline and then click ``Create``.
95+
96+
All data streamed to Golioth in CBOR format will now be routed to LightDB Stream and may be viewed
97+
using the web console. You may change this behavior at any time without updating firmware simply by
98+
editing this pipeline entry.
99+
72100
Golioth Features
73101
****************
74102

VERSION

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
VERSION_MAJOR = 2
2+
VERSION_MINOR = 4
3+
PATCHLEVEL = 1
4+
VERSION_TWEAK = 0
5+
EXTRAVERSION =

boards/aludel_mini_nrf9160_ns.overlay

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
&i2c2 {
2+
/* Needed for I2C writes used by libostentus */
3+
zephyr,concat-buf-size = <48>;
4+
5+
ostentus@12 {
6+
status = "okay";
7+
compatible = "golioth,ostentus";
8+
reg = <0x12>;
9+
};
10+
};

boards/thingy91_nrf9160_ns.conf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ CONFIG_NET_SOCKETS_TLS_PRIORITY=35
1717

1818
# Modem library
1919
CONFIG_NRF_MODEM_LIB=y
20-
CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
2120

2221
# LTE connectivity with network connection manager
23-
CONFIG_LTE_CONNECTIVITY=y
24-
CONFIG_LTE_CONNECTIVITY_AUTO_CONNECT=n
22+
CONFIG_NRF_MODEM_LIB_NET_IF=y
23+
CONFIG_NRF_MODEM_LIB_NET_IF_AUTO_START=y
24+
CONFIG_NRF_MODEM_LIB_NET_IF_AUTO_CONNECT=n
2525
CONFIG_NET_CONNECTION_MANAGER=y
2626
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
2727

@@ -32,6 +32,12 @@ CONFIG_GOLIOTH_SAMPLE_NRF91_LTE_MONITOR=y
3232
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED=n
3333
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED=n
3434

35+
# MbedTLS configuration to support p-384 curve. These options
36+
# enable using the MbedTLS built-in support for operations not
37+
# supported by the default nRF Oberon crypto backend
38+
CONFIG_NORDIC_SECURITY_BACKEND=n
39+
CONFIG_MBEDTLS_LEGACY_CRYPTO_C=y
40+
3541
# Add Network Info Support
3642
CONFIG_MODEM_INFO=y
3743

pipelines/cbor-to-lightdb.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
filter:
2+
path: "*"
3+
content_type: application/cbor
4+
steps:
5+
- name: step-0
6+
transformer:
7+
type: cbor-to-json
8+
version: v1
9+
destination:
10+
type: lightdb-stream
11+
version: v1

0 commit comments

Comments
 (0)