Skip to content

Commit

Permalink
feat: update to NCS 2.5 (#26)
Browse files Browse the repository at this point in the history
Closes #25
  • Loading branch information
maxd-nordic committed Nov 27, 2023
1 parent efc2831 commit c400c43
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 27 deletions.
63 changes: 38 additions & 25 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:

build-asset_tracker_v2:
runs-on: ubuntu-22.04
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
env:
CMAKE_PREFIX_PATH: /opt/toolchains

needs: [release-version, date-string]

Expand Down Expand Up @@ -83,13 +86,25 @@ jobs:
path: firmware
submodules: recursive

- run: mv firmware/sdk-nrf firmware/nrf

- name: Initialize
working-directory: firmware/nrf
run: |
sudo apt-get update
sudo apt-get install -y ruby
pip3 install -r scripts/requirements-build.txt
west init -l .
west config manifest.group-filter +bsec
west update -o=--depth=1 -n
- name: Build for Thingy:91
if: contains(matrix.configuration, 'thingy91')
run: echo 'board=thingy91_nrf9160_ns' >> $GITHUB_ENV

- name: Build for 9160DK
if: contains(matrix.configuration, 'nrf9160dk')
run: echo 'board=nrf9160dk_nrf9160_ns' >> $GITHUB_ENV
run: echo 'board=nrf9160dk_nrf9160_ns@0.7.0' >> $GITHUB_ENV

- name: Configure Version
working-directory: firmware
Expand Down Expand Up @@ -138,10 +153,10 @@ jobs:
run: echo CONFIG_OVERLAY=overlay-low-power.conf >> $GITHUB_ENV

- name: enable debug build
working-directory: firmware
if: contains(matrix.configuration, 'debug')
run: |
echo CONFIG_OVERLAY=overlay-debug.conf >> $GITHUB_ENV
echo "CONFIG_NRF_MODEM_LIB_TRACE=y" >> firmware.conf
- name: enable solar shield support
if: contains(matrix.configuration, 'solar')
Expand All @@ -152,8 +167,7 @@ jobs:
- name: enable WiFi shield support
if: contains(matrix.configuration, 'wifi')
run: |
echo SHIELD_OVERLAY=overlay-nrf7002ek-wifi-scan-only.conf >> $GITHUB_ENV
echo EXTRA_ARGS="-DSHIELD=nrf7002_ek -DDTC_OVERLAY_FILE=nrf9160dk_with_nrf7002ek.overlay" >> $GITHUB_ENV
echo EXTRA_ARGS="-DSHIELD=nrf7002ek -DEXTRA_DTC_OVERLAY_FILE=nrf91xxdk_with_nrf7002ek.overlay -DEXTRA_CONF_FILE=overlay-nrf7002ek-wifi-scan-only.conf" >> $GITHUB_ENV
# WiFi cannot be combined with P-GPS support
- name: enable P-GPS
Expand All @@ -162,39 +176,38 @@ jobs:

- name: enable BSEC library to support Bosch BME680 Environmental sensor
if: contains(matrix.configuration, 'thingy91')
working-directory: firmware/sdk-nrf/ext
working-directory: firmware
run: |
wget -q ${{ secrets.BSEC_ARCHIVE_URL }} -O bsec.zip
unzip -q bsec.zip
ls BSEC_1.4.8.0_Generic_Release_updated_v3
echo BSEC_OVERLAY=/workdir/project/overlay-bsec.conf >> $GITHUB_ENV
echo BSEC_OVERLAY=overlay-bsec.conf >> $GITHUB_ENV
- run: cat firmware.conf
working-directory: firmware

- name: copy overlays
run: |
cp firmware/firmware.conf firmware/nrf/applications/asset_tracker_v2
cp firmware/overlay-bsec.conf firmware/nrf/applications/asset_tracker_v2
- name: Build
working-directory: firmware
working-directory: firmware/nrf/applications/asset_tracker_v2
# -Werror=no-unused-variable below is needed for BSEC to compile
run: |
docker run --rm \
-v ${PWD}:/workdir/project \
-v ${PWD}/sdk-nrf:/workdir/nrf \
-w /workdir/nrf/applications/asset_tracker_v2 \
nordicplayground/nrfconnect-sdk:v2.4-branch \
west build \
-p always \
-b ${{ env.board }} \
--build-dir /workdir/project/build \
-- \
${{ env.EXTRA_ARGS }} \
-DOVERLAY_CONFIG="${{ env.CONFIG_OVERLAY }};${{ env.PGPS_OVERLAY }};${{ env.AWS_OVERLAY }};${{ env.MEMFAULT_OVERLAY }};/workdir/project/firmware.conf;${{ env.SHIELD_OVERLAY }};${{ env.BSEC_OVERLAY }}" \
-DEXTRA_CFLAGS="-Werror -Wno-unused-variable"
west build \
-p always \
-b ${{ env.board }} \
-- \
${{ env.EXTRA_ARGS }} \
-DOVERLAY_CONFIG="${{ env.CONFIG_OVERLAY }};${{ env.PGPS_OVERLAY }};${{ env.AWS_OVERLAY }};${{ env.MEMFAULT_OVERLAY }};firmware.conf;${{ env.SHIELD_OVERLAY }};${{ env.BSEC_OVERLAY }}" \
-DEXTRA_CFLAGS="-Werror -Wno-unused-variable"
- run: mv firmware/nrf/applications/asset_tracker_v2/build firmware/build
if: always()

- run: cat firmware/build/zephyr/.config
if: failure()
if: always()

- run: cat firmware/build/zephyr/zephyr.dts
if: failure()
if: always()

- name: Upload symbols file to Memfault
if: contains(matrix.configuration, 'memfault')
Expand Down
2 changes: 1 addition & 1 deletion overlay-bsec.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disable native Zephyr driver
CONFIG_BME680=n
# Enable vendor driver
CONFIG_EXTERNAL_SENSORS_BME680_BSEC=y
CONFIG_BME68X_IAQ=y
2 changes: 1 addition & 1 deletion sdk-nrf
Submodule sdk-nrf updated 5132 files

0 comments on commit c400c43

Please sign in to comment.