Skip to content

Commit be96f5c

Browse files
[examples] Aligned nrfconnect examples to the NCS 2.7.0 version
The new nRF Connect SDK 2.7.0 version introduced significant changes in the build system that resulted in a requirement to refactor all examples suported by nrfconnect platform.
1 parent 5461466 commit be96f5c

File tree

240 files changed

+3673
-2095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+3673
-2095
lines changed

.github/workflows/examples-nrfconnect.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
- name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle
8787
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
8888
run: |
89-
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONF_FILE=prj_no_dfu.conf -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
89+
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y
9090
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
9191
nrfconnect nrf52840dongle_nrf52840 lighting-app \
9292
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# This script checks is sysbuild is used to build the target. If not, it prints the fatal error
18+
# message, as the nRF Connect examples do not support deprecated child-image approach anymore.
19+
20+
if (NOT SYSBUILD)
21+
message(FATAL_ERROR " ###################################################################################\n"
22+
" # This example does not support child-image approach anymore. #\n"
23+
" # The nRF Connect SDK platform marked child-image approach as deprecated #\n"
24+
" # and it is recommended to use the new sysbuild solution. #\n"
25+
" # #\n"
26+
" # To build this application with sysbuild support enabled, #\n"
27+
" # you have to add --sysbuild flag to the build command, for example: #\n"
28+
" # #\n"
29+
" # west build -b <your_board_name> --sysbuild nameIt was moved to support sysbuild #\n"
30+
" ###################################################################################\n")
31+
endif()

examples/all-clusters-app/nrfconnect/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized)
3434

3535
project(chip-nrfconnect-all-clusters-app-example)
3636

37+
include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake)
3738
include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake)
3839
include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake)
3940
include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
#### Radio core selection
18+
config NRF_DEFAULT_IPC_RADIO
19+
default y
20+
21+
# Enable IEEE802.15.4 serialization to network core
22+
config NETCORE_IPC_RADIO_IEEE802154
23+
default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X
24+
25+
# Enable Bluetooth serialization to network core
26+
config NETCORE_IPC_RADIO_BT_HCI_IPC
27+
default y if SOC_SERIES_NRF53X
28+
29+
if BOOTLOADER_MCUBOOT
30+
31+
#### DFU multi-image support
32+
config DFU_MULTI_IMAGE_PACKAGE_BUILD
33+
default y
34+
35+
config DFU_MULTI_IMAGE_PACKAGE_APP
36+
default y
37+
38+
config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
39+
default y
40+
41+
#### DFU network core configuration
42+
if SOC_SERIES_NRF53X
43+
44+
config MCUBOOT_UPDATEABLE_IMAGES
45+
default 2
46+
47+
choice MCUBOOT_MODE
48+
default MCUBOOT_MODE_OVERWRITE_ONLY
49+
endchoice
50+
51+
choice BOOT_SIGNATURE_TYPE
52+
default BOOT_SIGNATURE_TYPE_RSA
53+
endchoice
54+
55+
config SECURE_BOOT_NETCORE
56+
default y
57+
58+
config NETCORE_APP_UPDATE
59+
default y
60+
61+
config DFU_MULTI_IMAGE_PACKAGE_NET
62+
default y
63+
64+
endif # SOC_SERIES_NRF53X
65+
endif # BOOTLOADER_MCUBOOT
66+
67+
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf

-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,3 @@ CONFIG_MATTER_LOG_LEVEL_INF=y
3838

3939
# Use partition manager to configure the settings partition not to overlap with Open Bootloader
4040
CONFIG_PM_SINGLE_IMAGE=y
41-
42-
# Enable CHIP pairing automatically on application start.
43-
CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y

examples/all-clusters-app/nrfconnect/child_image/hci_ipc/prj.conf

-25
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/hci_ipc/prj_dfu.conf

-25
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/hci_ipc/prj_release.conf

-25
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay

-21
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay

-21
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay

-20
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay

-21
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay

-21
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay

-21
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf

-30
This file was deleted.

examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_release.conf

-30
This file was deleted.

0 commit comments

Comments
 (0)