From 10b67ad3c6ac44ffc971ffb8b55c89aafde15b5a Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:27:24 +0200 Subject: [PATCH] Update of nRF Connect SDK version to the 2.7.0 (#34403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [workflows] Updated docker version used in workflows Updated docker version used in all workflows due to the new docker version pushed to the dockerhub. Additionally, changed the recommended version of nRF Connect SDK to the 2.7.0 * [nrfconnect] Disable Zephyr socket extensions The recvmsg() is now implemented natively in Zephyr, so we are not supposed to define a custom one. Signed-off-by: Marcin Kajor [nrfconnect] Fixed calculation of Wi-Fi unicast counters Wi-Fi unicast tx/rx counters were calculated based on a wrong values, what could lead to getting negative results. Recent changes allow to use dedicated unicast structure field instead of obtaining the values based on calculation. Signed-off-by: Kamil Kasperczyk [nrfconnect] config: Add initial sysbuild files Adds initial sysbuild files Signed-off-by: Jamie McCrae [nrfconnect] Add support for Matter OTA in sysbuild Converted matter-ota.cmake script to sysbuild. [nrfconnect] Added Kconfig to enable BDX transfer for logs Introduced Kconfig to enable BDX transfer for diagnostic logs purposes. [nrfconnect] Removed setting BT_HCI_RAW_RESERVE config to 1 Aligning configuration to the one introduced in the Zephyr upmerge. Signed-off-by: Kamil Kasperczyk [nrfconnect] Removed setting mbedtls external rng config Removed settings default value for the MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG Kconfig, as it's handled by the mbedtls module. [nrfconnect] Disabled boot banner in mcuboot config With the recent Zephyr upmerge a new boot banner configs were enabled by default, what results in flash increase and memory partition overflow. This commit disables newly introduced configs. [nrfconnect] Enable SPI configuration for nRF54L. The external flash on nRF54L DK is driven by SPI, so we need to enable appropriate drivers. Also enabled MCUMGR_GRP_IMG_ALLOW_ERASE_PENDING config that allows to overwrite the secondary slot image even if the pending flag is set on that image. Signed-off-by: Marcin Kajor [nrfconnect] Enable MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH config This commit enables MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH for Matter over Wi-Fi to optimize flash usage. Signed-off-by: Ɓukasz Duda [nrfconnect] Fixed paths to used in the guides Guides contain path examples referring to the older build system version and they have to be updated. Signed-off-by: Kamil Kasperczyk [nrfconnect] Align factory data guide to sysbuild - Aligned all kconfigs to the new provided by sysbuild. [nrfconnect] Disable `CONFIG_FPU` by default to align with OT libraries Remove setting `CONFIG_FPU` to `y` by default as OpenThread libraries are now build without FPU support. Signed-off-by: Maciej Baczmanski [nrfconnect] Fix missing network band in scan response. There is a missing network band parameter in the scan response, and due to that the `networkcommissioning scan-networks` command shows 0 as the band field for all found networks. * [nrfconnect] Removed defaults for child images Due to the sysbuild integration and child images deprecation the default configuration for child images has been removed. * [nrfconnect] Changed pm static configuration scheme * [nrfconnect] Added missing include net_if.h file Adding missing include of a net_if.h file and define for the undefined config that makes nrfconnect platform not working for the Wi-Fi. * [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. * [nrfconnect] Fixed scripts building nrfconnect platform Added --sysbuild flag for build scripts that is required by the west build command used with nrfconnect platform. * [workflows] Partially reverted Updated docker version This partially reverts commit 8228fc5 to not update all platforms at once and troubleshoot CI problems one by one. * [nrfconnect] Added typing_extenstions to nrfconnect requirements The factory data script started to fail with Python 3.12. Adding typing_extensions to requirements fixes the issue. * Addressed review comments * [workflows] Fixed nrfconnect workflows * Fixed paths to build artifacts in nrfconnect workflow * Fixed passing device type name to the chef app --------- Co-authored-by: Marcin Kajor --- .github/workflows/chef.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 62 ++--- .../.nrfconnect-recommended-revision | 2 +- .../nrfconnect/app/check-sysbuild-use.cmake | 31 +++ config/nrfconnect/chip-module/CMakeLists.txt | 4 +- config/nrfconnect/chip-module/Kconfig | 5 + .../nrfconnect/chip-module/Kconfig.defaults | 13 +- .../nrfconnect/chip-module/Kconfig.features | 3 +- .../chip-module/Kconfig.hci_ipc.defaults | 83 ------ .../chip-module/Kconfig.hci_ipc.root | 21 -- .../chip-module/Kconfig.mcuboot.defaults | 138 ---------- .../chip-module/Kconfig.mcuboot.root | 21 -- .../Kconfig.multiprotocol_rpmsg.defaults | 83 ------ .../Kconfig.multiprotocol_rpmsg.root | 21 -- .../generate_factory_data_sysbuild.cmake | 249 ++++++++++++++++++ config/zephyr/ota-image_sysbuild.cmake | 102 +++++++ .../nrfconnect_examples_software_update.md | 14 +- .../nrfconnect_factory_data_configuration.md | 32 +-- .../nrfconnect/CMakeLists.txt | 10 +- .../nrfconnect/Kconfig.sysbuild | 67 +++++ .../boards/nrf52840dongle_nrf52840.conf | 3 - .../nrfconnect/child_image/hci_rpmsg/prj.conf | 25 -- .../child_image/hci_rpmsg/prj_no_dfu.conf | 25 -- .../child_image/hci_rpmsg/prj_release.conf | 25 -- .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 21 -- .../nrf7002dk_nrf5340_cpuapp_release.overlay | 21 -- .../child_image/mcuboot/prj_dfu.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- ... => pm_static_nrf52840dk_nrf52840_dfu.yml} | 0 ...pm_static_nrf52840dk_nrf52840_release.yml} | 0 ...m_static_nrf5340dk_nrf5340_cpuapp_dfu.yml} | 0 ...atic_nrf5340dk_nrf5340_cpuapp_release.yml} | 0 ...m_static_nrf7002dk_nrf5340_cpuapp_dfu.yml} | 0 ...atic_nrf7002dk_nrf5340_cpuapp_release.yml} | 0 examples/all-clusters-app/nrfconnect/prj.conf | 7 + .../all-clusters-app/nrfconnect/prj_dfu.conf | 7 + .../nrfconnect/prj_release.conf | 7 + .../all-clusters-app/nrfconnect/sysbuild.conf | 18 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../boards/nrf7002dk_nrf5340_cpunet.conf | 52 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_dfu.conf | 20 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 3 + .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay} | 3 + .../boards/nrf7002dk_nrf5340_cpuapp.conf | 40 +++ .../boards/nrf7002dk_nrf5340_cpuapp.overlay} | 3 + .../nrfconnect/sysbuild}/mcuboot/prj.conf | 29 +- .../nrfconnect/sysbuild_dfu.conf | 20 ++ .../nrfconnect/sysbuild_release.conf | 20 ++ .../nrfconnect/CMakeLists.txt | 9 +- .../nrfconnect/Kconfig.sysbuild | 67 +++++ .../boards/nrf52840dongle_nrf52840.conf | 3 - .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../child_image/mcuboot/prj_dfu.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840_dfu.yml} | 0 ...pm_static_nrf52840dk_nrf52840_release.yml} | 0 ...m_static_nrf5340dk_nrf5340_cpuapp_dfu.yml} | 0 ...atic_nrf5340dk_nrf5340_cpuapp_release.yml} | 0 .../nrfconnect/prj.conf | 7 + .../nrfconnect/prj_dfu.conf | 7 + .../nrfconnect/prj_release.conf | 7 + .../nrfconnect/sysbuild.conf | 18 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../boards/nrf7002dk_nrf5340_cpunet.conf | 52 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_dfu.conf | 20 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 4 + .../boards/nrf7002dk_nrf5340_cpuapp.conf | 40 +++ .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf} | 29 +- .../nrfconnect/sysbuild_dfu.conf | 20 ++ .../nrfconnect/sysbuild_release.conf | 20 ++ examples/chef/chef.py | 6 +- examples/chef/nrfconnect/CMakeLists.txt | 13 +- examples/chef/nrfconnect/Kconfig | 6 + .../nrfconnect/Kconfig.sysbuild} | 18 +- examples/chef/nrfconnect/prj.conf | 6 +- examples/chef/nrfconnect/sysbuild.conf | 18 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/CMakeLists.txt | 10 +- .../nrfconnect/Kconfig.sysbuild | 76 ++++++ .../nrfconnect/child_image/hci_rpmsg/prj.conf | 25 -- .../child_image/hci_rpmsg/prj_no_dfu.conf | 25 -- .../child_image/hci_rpmsg/prj_release.conf | 25 -- .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 21 -- .../nrf7002dk_nrf5340_cpuapp_release.overlay | 21 -- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- ....yml => pm_static_nrf52840dk_nrf52840.yml} | 0 ...pm_static_nrf52840dk_nrf52840_release.yml} | 0 .../pm_static_nrf5340dk_nrf5340_cpuapp.yml} | 0 ...atic_nrf5340dk_nrf5340_cpuapp_release.yml} | 0 .../pm_static_nrf7002dk_nrf5340_cpuapp.yml} | 0 ...atic_nrf7002dk_nrf5340_cpuapp_release.yml} | 0 examples/light-switch-app/nrfconnect/prj.conf | 7 + .../nrfconnect/prj_no_dfu.conf | 52 ---- .../nrfconnect/prj_release.conf | 7 + .../nrfconnect/sysbuild.conf} | 4 +- .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../boards/nrf7002dk_nrf5340_cpunet.conf | 52 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../boards/nrf7002dk_nrf5340_cpuapp.conf | 40 +++ .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 24 ++ .../mcuboot/prj.conf | 31 ++- .../lighting-app/nrfconnect/CMakeLists.txt | 10 +- .../lighting-app/nrfconnect/Kconfig.sysbuild | 79 ++++++ ..._dfu.conf => nrf52840dongle_nrf52840.conf} | 6 + .../nrfconnect/child_image/hci_rpmsg/prj.conf | 25 -- .../child_image/hci_rpmsg/prj_no_dfu.conf | 25 -- .../child_image/hci_rpmsg/prj_release.conf | 25 -- .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../boards/nrf7002dk_nrf5340_cpuapp.conf | 17 -- .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 21 -- .../nrf7002dk_nrf5340_cpuapp_release.conf | 17 -- .../nrf7002dk_nrf5340_cpuapp_release.overlay | 21 -- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../main/include/CHIPProjectConfig.h | 5 - .../pm_static_nrf52840dk_nrf52840.yml} | 0 ...pm_static_nrf52840dk_nrf52840_release.yml} | 0 ... => pm_static_nrf52840dongle_nrf52840.yml} | 0 .../pm_static_nrf5340dk_nrf5340_cpuapp.yml} | 0 ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ .../pm_static_nrf7002dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf7002dk_nrf5340_cpuapp_release.yml | 56 ++++ examples/lighting-app/nrfconnect/prj.conf | 6 +- .../lighting-app/nrfconnect/prj_no_dfu.conf | 56 ---- .../lighting-app/nrfconnect/prj_release.conf | 6 +- .../nrfconnect/sysbuild.conf} | 4 +- .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../boards/nrf7002dk_nrf5340_cpunet.conf | 52 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../boards/nrf7002dk_nrf5340_cpuapp.conf | 40 +++ .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 24 ++ .../mcuboot/prj.conf | 31 ++- .../lit-icd-app/nrfconnect/CMakeLists.txt | 9 +- .../lit-icd-app/nrfconnect/Kconfig.sysbuild | 76 ++++++ .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840.yml} | 0 ...pm_static_nrf52840dk_nrf52840_release.yml} | 0 .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ examples/lit-icd-app/nrfconnect/prj.conf | 7 + .../lit-icd-app/nrfconnect/prj_no_dfu.conf | 48 ---- .../lit-icd-app/nrfconnect/prj_release.conf | 7 + .../nrfconnect/sysbuild.conf} | 4 +- .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf | 49 ++++ examples/lock-app/nrfconnect/CMakeLists.txt | 12 +- examples/lock-app/nrfconnect/Kconfig.sysbuild | 76 ++++++ .../nrfconnect/child_image/hci_rpmsg/prj.conf | 25 -- .../child_image/hci_rpmsg/prj_no_dfu.conf | 25 -- .../child_image/hci_rpmsg/prj_release.conf | 25 -- .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../boards/nrf7002dk_nrf5340_cpuapp.conf | 17 -- .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 21 -- .../nrf7002dk_nrf5340_cpuapp_release.conf | 17 -- .../nrf7002dk_nrf5340_cpuapp_release.overlay | 21 -- .../nrfconnect/child_image/mcuboot/prj.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840.yml} | 0 .../pm_static_nrf52840dk_nrf52840_release.yml | 42 +++ .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ .../pm_static_nrf7002dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf7002dk_nrf5340_cpuapp_release.yml | 56 ++++ examples/lock-app/nrfconnect/prj.conf | 4 + examples/lock-app/nrfconnect/prj_no_dfu.conf | 46 ---- examples/lock-app/nrfconnect/prj_release.conf | 4 + .../nrfconnect/sysbuild.conf} | 4 +- .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../boards/nrf7002dk_nrf5340_cpunet.conf | 52 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../boards/nrf7002dk_nrf5340_cpuapp.conf | 40 +++ .../boards/nrf7002dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf | 49 ++++ examples/pump-app/nrfconnect/CMakeLists.txt | 9 +- examples/pump-app/nrfconnect/Kconfig.sysbuild | 76 ++++++ .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../nrfconnect/child_image/mcuboot/prj.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840.yml | 42 +++ .../pm_static_nrf52840dk_nrf52840_release.yml | 42 +++ .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ examples/pump-app/nrfconnect/prj.conf | 7 + examples/pump-app/nrfconnect/prj_no_dfu.conf | 46 ---- examples/pump-app/nrfconnect/prj_release.conf | 7 + examples/pump-app/nrfconnect/sysbuild.conf | 17 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf | 49 ++++ .../nrfconnect/CMakeLists.txt | 9 +- .../nrfconnect/Kconfig.sysbuild | 76 ++++++ .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../nrfconnect/child_image/mcuboot/prj.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840.yml | 42 +++ .../pm_static_nrf52840dk_nrf52840_relese.yml | 42 +++ .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ .../pump-controller-app/nrfconnect/prj.conf | 7 + .../nrfconnect/prj_no_dfu.conf | 47 ---- .../nrfconnect/prj_release.conf | 7 + .../nrfconnect/sysbuild.conf | 17 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf | 49 ++++ examples/window-app/nrfconnect/CMakeLists.txt | 9 +- .../window-app/nrfconnect/Kconfig.sysbuild | 76 ++++++ .../boards/nrf52840dk_nrf52840.overlay | 21 -- .../nrf52840dk_nrf52840_release.overlay | 21 -- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 20 -- .../nrf5340dk_nrf5340_cpuapp_release.overlay | 21 -- .../nrfconnect/child_image/mcuboot/prj.conf | 30 --- .../child_image/mcuboot/prj_release.conf | 30 --- .../child_image/multiprotocol_rpmsg/prj.conf | 25 -- .../multiprotocol_rpmsg/prj_no_dfu.conf | 25 -- .../multiprotocol_rpmsg/prj_release.conf | 25 -- .../pm_static_nrf52840dk_nrf52840.yml | 42 +++ .../pm_static_nrf52840dk_nrf52840_release.yml | 42 +++ .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 ++++ ...tatic_nrf5340dk_nrf5340_cpuapp_release.yml | 56 ++++ examples/window-app/nrfconnect/prj.conf | 7 + .../window-app/nrfconnect/prj_no_dfu.conf | 62 ----- .../window-app/nrfconnect/prj_release.conf | 7 + examples/window-app/nrfconnect/sysbuild.conf | 17 ++ .../boards/nrf5340dk_nrf5340_cpunet.conf | 58 ++++ .../nrfconnect/sysbuild/ipc_radio/prj.conf | 21 ++ .../sysbuild/ipc_radio/prj_release.conf | 20 ++ .../nrfconnect/sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 19 ++ .../boards/nrf52840dk_nrf52840.overlay | 24 ++ .../boards/nrf5340dk_nrf5340_cpuapp.conf | 35 +++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 24 ++ .../nrfconnect/sysbuild/mcuboot/prj.conf | 49 ++++ integrations/cloudbuild/chef.yaml | 8 +- integrations/cloudbuild/smoke-test.yaml | 14 +- scripts/build/builders/nrf.py | 6 +- .../testdata/dry_run_nrf-nrf52840dk-pump.txt | 2 +- scripts/examples/nrfconnect_example.sh | 2 +- scripts/setup/constraints.txt | 2 +- scripts/setup/requirements.nrfconnect.txt | 1 + .../nrfconnect/CHIPDevicePlatformConfig.h | 5 + src/platform/nrfconnect/CHIPPlatformConfig.h | 6 + .../nrfconnect/ConnectivityManagerImpl.cpp | 4 + .../nrfconnect/SystemPlatformConfig.h | 3 + src/platform/nrfconnect/wifi/WiFiManager.cpp | 26 +- src/test_driver/nrfconnect/sysbuild.conf | 17 ++ 341 files changed, 5531 insertions(+), 3222 deletions(-) create mode 100644 config/nrfconnect/app/check-sysbuild-use.cmake delete mode 100644 config/nrfconnect/chip-module/Kconfig.hci_ipc.defaults delete mode 100644 config/nrfconnect/chip-module/Kconfig.hci_ipc.root delete mode 100644 config/nrfconnect/chip-module/Kconfig.mcuboot.defaults delete mode 100644 config/nrfconnect/chip-module/Kconfig.mcuboot.root delete mode 100644 config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults delete mode 100644 config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root create mode 100644 config/nrfconnect/chip-module/generate_factory_data_sysbuild.cmake create mode 100644 config/zephyr/ota-image_sysbuild.cmake create mode 100644 examples/all-clusters-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf delete mode 100644 examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/all-clusters-app/nrfconnect/{configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => pm_static_nrf52840dk_nrf52840_dfu.yml} (100%) rename examples/{all-clusters-minimal-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml} (100%) rename examples/{light-switch-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml} (100%) rename examples/{lighting-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml} (100%) rename examples/all-clusters-app/nrfconnect/{configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml => pm_static_nrf7002dk_nrf5340_cpuapp_dfu.yml} (100%) rename examples/{light-switch-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml} (100%) create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf rename examples/{lit-icd-app/nrfconnect/child_image => all-clusters-app/nrfconnect/sysbuild}/mcuboot/boards/nrf52840dk_nrf52840.overlay (90%) create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf rename examples/{lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay => all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay} (90%) create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf rename examples/{lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay => all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay} (90%) rename examples/{lit-icd-app/nrfconnect/child_image => all-clusters-app/nrfconnect/sysbuild}/mcuboot/prj.conf (62%) create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf create mode 100644 examples/all-clusters-app/nrfconnect/sysbuild_release.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_dfu.conf delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf delete mode 100644 examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/{all-clusters-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => all-clusters-minimal-app/nrfconnect/pm_static_nrf52840dk_nrf52840_dfu.yml} (100%) rename examples/all-clusters-minimal-app/nrfconnect/{configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => pm_static_nrf52840dk_nrf52840_release.yml} (100%) rename examples/{lit-icd-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml} (100%) rename examples/{lock-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml} (100%) create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf rename examples/{lit-icd-app/nrfconnect/child_image => all-clusters-minimal-app/nrfconnect/sysbuild}/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay (90%) create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay rename examples/{lit-icd-app/nrfconnect/child_image/mcuboot/prj_release.conf => all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/prj.conf} (62%) create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild_dfu.conf create mode 100644 examples/all-clusters-minimal-app/nrfconnect/sysbuild_release.conf rename examples/{lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf => chef/nrfconnect/Kconfig.sysbuild} (60%) create mode 100644 examples/chef/nrfconnect/sysbuild.conf create mode 100644 examples/chef/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/chef/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/chef/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/light-switch-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/light-switch-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/light-switch-app/nrfconnect/{configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => pm_static_nrf52840dk_nrf52840.yml} (100%) rename examples/{lighting-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => light-switch-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml} (100%) rename examples/{pump-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml} (100%) rename examples/{pump-controller-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml} (100%) rename examples/{lighting-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml => light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml} (100%) rename examples/{lock-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml => light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml} (100%) delete mode 100644 examples/light-switch-app/nrfconnect/prj_no_dfu.conf rename examples/{all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf => light-switch-app/nrfconnect/sysbuild.conf} (90%) create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf create mode 100644 examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay rename examples/light-switch-app/nrfconnect/{child_image => sysbuild}/mcuboot/prj.conf (59%) create mode 100644 examples/lighting-app/nrfconnect/Kconfig.sysbuild rename examples/lighting-app/nrfconnect/boards/{nrf52840dongle_nrf52840_no_dfu.conf => nrf52840dongle_nrf52840.conf} (93%) delete mode 100644 examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/lighting-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/{lit-icd-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml} (100%) rename examples/{lock-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml} (100%) rename examples/lighting-app/nrfconnect/{pm_static_nrf52840dongle_nrf52840_no_dfu.yml => pm_static_nrf52840dongle_nrf52840.yml} (100%) rename examples/{window-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml => lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml} (100%) create mode 100644 examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml create mode 100644 examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml create mode 100644 examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/lighting-app/nrfconnect/prj_no_dfu.conf rename examples/{all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf => lighting-app/nrfconnect/sysbuild.conf} (90%) create mode 100644 examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf create mode 100644 examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay rename examples/lighting-app/nrfconnect/{child_image => sysbuild}/mcuboot/prj.conf (59%) create mode 100644 examples/lit-icd-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/{pump-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml} (100%) rename examples/{pump-controller-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml} (100%) create mode 100644 examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/lit-icd-app/nrfconnect/prj_no_dfu.conf rename examples/{light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf => lit-icd-app/nrfconnect/sysbuild.conf} (90%) create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/prj.conf create mode 100644 examples/lock-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/prj.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf rename examples/{window-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml => lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml} (100%) create mode 100644 examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml create mode 100644 examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml create mode 100644 examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml create mode 100644 examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/lock-app/nrfconnect/prj_no_dfu.conf rename examples/{light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf => lock-app/nrfconnect/sysbuild.conf} (90%) create mode 100644 examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay create mode 100644 examples/lock-app/nrfconnect/sysbuild/mcuboot/prj.conf create mode 100644 examples/pump-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/prj.conf delete mode 100644 examples/pump-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf create mode 100644 examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml create mode 100644 examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml create mode 100644 examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/pump-app/nrfconnect/prj_no_dfu.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/pump-app/nrfconnect/sysbuild/mcuboot/prj.conf create mode 100644 examples/pump-controller-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj.conf delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf create mode 100644 examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml create mode 100644 examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840_relese.yml create mode 100644 examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/pump-controller-app/nrfconnect/prj_no_dfu.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/prj.conf create mode 100644 examples/window-app/nrfconnect/Kconfig.sysbuild delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/prj.conf delete mode 100644 examples/window-app/nrfconnect/child_image/mcuboot/prj_release.conf delete mode 100644 examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf delete mode 100644 examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf delete mode 100644 examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf create mode 100644 examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml create mode 100644 examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml create mode 100644 examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml delete mode 100644 examples/window-app/nrfconnect/prj_no_dfu.conf create mode 100644 examples/window-app/nrfconnect/sysbuild.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/ipc_radio/prj.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/app.overlay create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 examples/window-app/nrfconnect/sysbuild/mcuboot/prj.conf create mode 100644 src/test_driver/nrfconnect/sysbuild.conf diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 7e19768e0bb532..70cb720eaa9d29 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:65 options: --user root steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index c8d997d5ca6631..591641c08e74eb 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:54 + image: ghcr.io/project-chip/chip-build-nrf-platform:65 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -78,119 +78,119 @@ jobs: - name: Build example nRF Connect SDK Lock App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh lock-app nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 lock-app \ - examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONF_FILE=prj_no_dfu.conf -DCONFIG_CHIP_ROTATING_DEVICE_ID=y + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle/nrf52840 -DCONFIG_CHIP_ROTATING_DEVICE_ID=y .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dongle_nrf52840 lighting-app \ - examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay + scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk/nrf52840 -DOVERLAY_CONFIG=rpc.overlay .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840+rpc lighting-app \ - examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Light Switch App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 light-switch-app \ - examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Shell on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' run: | - scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh shell nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 shell \ - examples/shell/nrfconnect/build/zephyr/zephyr.elf \ + examples/shell/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Pump App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh pump-app nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 pump-app \ - examples/pump-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/pump-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 pump-controller-app \ - examples/pump-controller-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/pump-controller-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters App on nRF52840 DK run: | - scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840 + scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk/nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 all-clusters-app \ - examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK run: | - scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf + scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk/nrf52840 -DFILE_SUFFIX=dfu .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \ - examples/all-clusters-minimal-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/all-clusters-minimal-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lock App on nRF5340 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh lock-app nrf5340dk/nrf5340/cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \ - examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF5340 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk/nrf5340/cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \ - examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lighting-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lock App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lock-app nrf7002dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh lock-app nrf7002dk/nrf5340/cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \ - examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/lock-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk/nrf5340/cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \ - examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' run: | - scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk_nrf5340_cpuapp + scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk/nrf5340/cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \ - examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/light-switch-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK run: | - scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf + scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk/nrf5340/cpuapp -DFILE_SUFFIX=release .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \ - examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \ + examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Run unit tests for Zephyr native_posix_64 platform if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index 8a965c116821a9..873ca0fa627c90 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.6.0 +v2.7.0 diff --git a/config/nrfconnect/app/check-sysbuild-use.cmake b/config/nrfconnect/app/check-sysbuild-use.cmake new file mode 100644 index 00000000000000..bd70da84a7479d --- /dev/null +++ b/config/nrfconnect/app/check-sysbuild-use.cmake @@ -0,0 +1,31 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script checks is sysbuild is used to build the target. If not, it prints the fatal error +# message, as the nRF Connect examples do not support deprecated child-image approach anymore. + +if (NOT SYSBUILD) + message(FATAL_ERROR " ###################################################################################\n" + " # This example does not support child-image approach anymore. #\n" + " # The nRF Connect SDK platform marked child-image approach as deprecated #\n" + " # from v2.7.0 and it is recommended to use the new sysbuild solution. #\n" + " # #\n" + " # To build this application with sysbuild support enabled, #\n" + " # you have to add --sysbuild flag to the build command, for example: #\n" + " # #\n" + " # west build -b --sysbuild #\n" + " ###################################################################################\n") +endif() diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 29560db74f38cc..bccd16b1416160 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -229,7 +229,7 @@ endif() # Define 'chip-ota-image' target for building CHIP OTA image # ============================================================================== -if (CONFIG_CHIP_OTA_IMAGE_BUILD) +if (CONFIG_CHIP_OTA_IMAGE_BUILD AND NOT SYSBUILD) chip_ota_image(chip-ota-image INPUT_FILES ${PROJECT_BINARY_DIR}/dfu_multi_image.bin OUTPUT_FILE ${PROJECT_BINARY_DIR}/${CONFIG_CHIP_OTA_IMAGE_FILE_NAME} @@ -240,7 +240,7 @@ endif() # Define 'factory_data' target for generating a factory data partition # ============================================================================== -if (CONFIG_CHIP_FACTORY_DATA_BUILD) +if(CONFIG_CHIP_FACTORY_DATA_BUILD AND (NOT SYSBUILD OR NOT CONFIG_PARTITION_MANAGER_ENABLED)) nrfconnect_generate_factory_data() endif() diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index dcd26199f9a1a3..2fd4f45de4b60c 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -297,4 +297,9 @@ config CHIP_PERSISTENT_SUBSCRIPTIONS # selecting experimental for this feature since there is an issue with multiple controllers. select EXPERIMENTAL +config CHIP_ENABLE_BDX_LOG_TRANSFER + bool "Enable BDX transfer for diagnostic logs" + help + Enables the BDX protocol for diagnostics log transfer purposes. + endif # CHIP diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index 218f39a3fa8f8a..a2e0a2ba5ee36a 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -40,9 +40,6 @@ config ASSERT_NO_MSG_INFO config HW_STACK_PROTECTION default y -config FPU - default y - config POSIX_MAX_FDS default 16 @@ -204,12 +201,12 @@ config CHIP_QSPI_NOR # nRF7002DK uses SPI NOR external flash -if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP +if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP config CHIP_SPI_NOR default y -endif # BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP +endif # BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP config BOOT_IMAGE_ACCESS_HOOKS default y if SOC_SERIES_NRF53X @@ -385,9 +382,6 @@ config MBEDTLS_ECP_DP_SECP256R1_ENABLED endif # !CHIP_CRYPTO_PSA -config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG - default n if CHIP_WIFI - config MBEDTLS_SSL_OUT_CONTENT_LEN default 900 if CHIP_WIFI @@ -423,6 +417,9 @@ config MBEDTLS_SSL_SRV_C config MBEDTLS_SSL_COOKIE_C default n +config MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH + default y + # ============================================================================== # Logging configuration # ============================================================================== diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index 667894c7696d85..fbae62d28e1f24 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -60,6 +60,7 @@ config CHIP_SPI_NOR imply SPI_NOR imply MULTITHREADING imply PM_OVERRIDE_EXTERNAL_DRIVER_CHECK + imply MCUMGR_GRP_IMG_ALLOW_ERASE_PENDING help Enables SPI NOR flash with a set of options for configuring pages and buffer sizes. @@ -149,7 +150,7 @@ endif config CHIP_DFU_OVER_BT_SMP bool "Enable DFU over Bluetooth LE SMP feature set" imply CHIP_QSPI_NOR if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 - imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP + imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP imply BOOTLOADER_MCUBOOT select MCUMGR select MCUMGR_TRANSPORT_BT diff --git a/config/nrfconnect/chip-module/Kconfig.hci_ipc.defaults b/config/nrfconnect/chip-module/Kconfig.hci_ipc.defaults deleted file mode 100644 index bede85fd2541d3..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.hci_ipc.defaults +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to define new default values of settings used when building hci_ipc child image for Matter samples. - -config LOG - default n - -config HEAP_MEM_POOL_SIZE - default 8192 - -config MAIN_STACK_SIZE - default 2048 - -config SYSTEM_WORKQUEUE_STACK_SIZE - default 2048 - -config BT - default y - -config BT_HCI_RAW - default y - -config BT_MAX_CONN - default 1 - -config BT_PERIPHERAL - default y - -config BT_CENTRAL - default n - -config BT_BUF_ACL_RX_SIZE - default 502 - -config BT_BUF_ACL_TX_SIZE - default 251 - -config BT_CTLR_DATA_LENGTH_MAX - default 251 - -config BT_CTLR_ASSERT_HANDLER - default y - -config BT_HCI_RAW_RESERVE - default 1 - -# Disable 2M PHY due to interoperability issues. -config BT_CTLR_PHY_2M - default n - -# Workaround: Unable to allocate command buffer when using K_NO_WAIT since -# Host number of completed commands does not follow normal flow control. -config BT_BUF_CMD_TX_COUNT - default 10 - -config ASSERT - default y - -config DEBUG_INFO - default y - -config EXCEPTION_STACK_TRACE - default y - -config IPC_SERVICE - default y - -config MBOX - default y diff --git a/config/nrfconnect/chip-module/Kconfig.hci_ipc.root b/config/nrfconnect/chip-module/Kconfig.hci_ipc.root deleted file mode 100644 index 1fe8ff85f43ee8..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.hci_ipc.root +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to create a wrapper Kconfig file that will be set as -# hci_ipc_KCONFIG_ROOT and processed before any other Kconfig for hci_ipc child image. - -rsource "Kconfig.hci_ipc.defaults" -source "Kconfig.zephyr" diff --git a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults b/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults deleted file mode 100644 index 11c7dd0320f464..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults +++ /dev/null @@ -1,138 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to define new default values of settings used when building mcuboot child image for Matter samples. - -config MAIN_STACK_SIZE - default 10240 - -config BOOT_ENCRYPT_IMAGE - default n - -config BOOT_BOOTSTRAP - default n - -config PM - default n - -config FLASH - default y - -config FPROTECT - default y - -choice LIBC_IMPLEMENTATION - default MINIMAL_LIBC -endchoice - -# nRF7002DK uses SPI NOR external flash -if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP - -config SPI - default y - -choice SPI_NOR_SFDP - default SPI_NOR_SFDP_DEVICETREE -endchoice - -config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE - default 4096 - -config MULTITHREADING - default y - -config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK - default y - -endif - -# All boards beside nRF7002DK use QSPI NOR external flash -if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 - -config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE - default 4096 - -config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - default 16 - -endif - -config BOOT_MAX_IMG_SECTORS - default 256 - -config LOG - default n - -config CONSOLE_HANDLER - default n - -config BOOT_BANNER - default n - -config TIMESLICING - default n - -config RESET_ON_FATAL_ERROR - default n - -config MULTITHREADING - default n - -config TICKLESS_KERNEL - default n - -config TIMEOUT_64BIT - default n - -config NRF_ENABLE_ICACHE - default n - -if SOC_SERIES_NRF53X - -# The following configurations are required to support simultaneous multi image update -config PCD_APP - default y - -config UPDATEABLE_IMAGE_NUMBER - default 2 - -# Multi-image updates do not support image swapping yet. -choice BOOT_IMAGE_UPGRADE_MODE - default BOOT_UPGRADE_ONLY -endchoice - -# The network core cannot access external flash directly. The flash simulator must be used to -# provide a memory region that is used to forward the new firmware to the network core. -config FLASH_SIMULATOR - default y - -config FLASH_SIMULATOR_DOUBLE_WRITES - default y - -config FLASH_SIMULATOR_STATS - default n - -# Enable custom command to erase settings partition. -config ENABLE_MGMT_PERUSER - default y - -config ZCBOR - default y - -config BOOT_MGMT_CUSTOM_STORAGE_ERASE - default y - -endif # SOC_SERIES_NRF53X diff --git a/config/nrfconnect/chip-module/Kconfig.mcuboot.root b/config/nrfconnect/chip-module/Kconfig.mcuboot.root deleted file mode 100644 index e8756636dfd66d..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.mcuboot.root +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to create a wrapper Kconfig file that will be set as -# mcuboot_KCONFIG_ROOT and processed before any other Kconfig for mcuboot child image. - -rsource "Kconfig.mcuboot.defaults" -source "${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr/Kconfig" diff --git a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults deleted file mode 100644 index 3d40e47429a074..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to define new default values of settings used when building multiprotocol_rpmsg child image for Matter samples. - -config LOG - default n - -config HEAP_MEM_POOL_SIZE - default 8192 - -config MAIN_STACK_SIZE - default 2048 - -config SYSTEM_WORKQUEUE_STACK_SIZE - default 2048 - -config BT - default y - -config BT_HCI_RAW - default y - -config BT_MAX_CONN - default 1 - -config BT_PERIPHERAL - default y - -config BT_CENTRAL - default n - -config BT_BUF_ACL_RX_SIZE - default 502 - -config BT_BUF_ACL_TX_SIZE - default 251 - -config BT_CTLR_DATA_LENGTH_MAX - default 251 - -config BT_CTLR_ASSERT_HANDLER - default y - -config BT_HCI_RAW_RESERVE - default 1 - -# Disable 2M PHY due to interoperability issues. -config BT_CTLR_PHY_2M - default n - -# Workaround: Unable to allocate command buffer when using K_NO_WAIT since -# Host number of completed commands does not follow normal flow control. -config BT_BUF_CMD_TX_COUNT - default 10 - -config ASSERT - default y - -config DEBUG_INFO - default y - -config EXCEPTION_STACK_TRACE - default y - -config NRF_802154_SER_RADIO - default y - -config NRF_802154_ENCRYPTION - default y diff --git a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root deleted file mode 100644 index b34c82243585b4..00000000000000 --- a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The purpose of this file is to create a wrapper Kconfig file that will be set as -# multiprotocol_rpmsg_KCONFIG_ROOT and processed before any other Kconfig for multiprotocol_rpmsg child image. - -rsource "Kconfig.multiprotocol_rpmsg.defaults" -source "Kconfig.zephyr" diff --git a/config/nrfconnect/chip-module/generate_factory_data_sysbuild.cmake b/config/nrfconnect/chip-module/generate_factory_data_sysbuild.cmake new file mode 100644 index 00000000000000..ff37a5f57e01a8 --- /dev/null +++ b/config/nrfconnect/chip-module/generate_factory_data_sysbuild.cmake @@ -0,0 +1,249 @@ +# +# Copyright (c) 2022-2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +# Create a .hex file in CBOR format based on factory data given via kConfigs. +# +# This function creates a list of arguments for external script and then run it to write a JSON file. +# Created JSON file can be checked using JSON SCHEMA file if it is provided. +# Next, the resulting .hex file is generated based on previously created JSON file. +# +# This script can be manipulated using following kConfigs: +# - To merge generated factory data with final zephyr.hex file set kConfig SB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y +# - To use default certification paths set CONFIG_CHIP_FACTORY_DATA_USE_DEFAULTS_CERTS_PATH=y +# +# During generation process the following files will be created in zephyr's build directory: +# - .json a file containing all factory data written in JSON format. +# - .hex a file containing all factory data in CBOR format. +# - .bin a binary file containing all raw factory data in CBOR format. +# - .cbor a file containing all factory data in CBOR format. +# +# [Args]: +# factory_data_target - a name for target to generate factory_data. +# script_path - a path to script that makes a JSON factory data file from given arguments. +# schema_path - a path to JSON schema file which can be used to verify generated factory data JSON file. +# This argument is optional, if you don't want to verify the JSON file put it empty "". +# output_path - a path to output directory, where created hex and JSON files will be stored. +function(nrfconnect_create_factory_data factory_data_target script_path schema_path output_path image) + sysbuild_get(CONFIG_CHIP_DEVICE_SERIAL_NUMBER IMAGE ${image} VAR CONFIG_CHIP_DEVICE_SERIAL_NUMBER KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_MANUFACTURING_DATE IMAGE ${image} VAR CONFIG_CHIP_DEVICE_MANUFACTURING_DATE KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_VENDOR_ID IMAGE ${image} VAR CONFIG_CHIP_DEVICE_VENDOR_ID KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_PRODUCT_ID IMAGE ${image} VAR CONFIG_CHIP_DEVICE_PRODUCT_ID KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_VENDOR_NAME IMAGE ${image} VAR CONFIG_CHIP_DEVICE_VENDOR_NAME KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_PRODUCT_NAME IMAGE ${image} VAR CONFIG_CHIP_DEVICE_PRODUCT_NAME KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_HARDWARE_VERSION IMAGE ${image} VAR CONFIG_CHIP_DEVICE_HARDWARE_VERSION KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING IMAGE ${image} VAR CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING KCONFIG) + sysbuild_get(CONFIG_CHIP_ROTATING_DEVICE_ID IMAGE ${image} VAR CONFIG_CHIP_ROTATING_DEVICE_ID KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID IMAGE ${image} VAR CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID IMAGE ${image} VAR CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_GENERATE_CD IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_GENERATE_CD KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_SPAKE2_IT IMAGE ${image} VAR CONFIG_CHIP_DEVICE_SPAKE2_IT KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_SPAKE2_SALT IMAGE ${image} VAR CONFIG_CHIP_DEVICE_SPAKE2_SALT KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_DISCRIMINATOR IMAGE ${image} VAR CONFIG_CHIP_DEVICE_DISCRIMINATOR KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE IMAGE ${image} VAR CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER IMAGE ${image} VAR CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_PRODUCT_FINISH IMAGE ${image} VAR CONFIG_CHIP_DEVICE_PRODUCT_FINISH KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_PRODUCT_COLOR IMAGE ${image} VAR CONFIG_CHIP_DEVICE_PRODUCT_COLOR KCONFIG) + sysbuild_get(CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES IMAGE ${image} VAR CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_ENABLE_KEY IMAGE ${image} VAR CONFIG_CHIP_DEVICE_ENABLE_KEY KCONFIG) + + # Set script args for future purpose + set(script_args) + + # Generate all script arguments + string(APPEND script_args "--sn \"${CONFIG_CHIP_DEVICE_SERIAL_NUMBER}\"\n") + string(APPEND script_args "--date \"${CONFIG_CHIP_DEVICE_MANUFACTURING_DATE}\"\n") + string(APPEND script_args "--vendor_id ${CONFIG_CHIP_DEVICE_VENDOR_ID}\n") + string(APPEND script_args "--product_id ${CONFIG_CHIP_DEVICE_PRODUCT_ID}\n") + string(APPEND script_args "--vendor_name \"${CONFIG_CHIP_DEVICE_VENDOR_NAME}\"\n") + string(APPEND script_args "--product_name \"${CONFIG_CHIP_DEVICE_PRODUCT_NAME}\"\n") + string(APPEND script_args "--hw_ver ${CONFIG_CHIP_DEVICE_HARDWARE_VERSION}\n") + string(APPEND script_args "--hw_ver_str \"${CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING}\"\n") + + # Check if Rotating Device Id Unique Id should be generated + if(CONFIG_CHIP_ROTATING_DEVICE_ID) + if(NOT CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID) + if(NOT DEFINED CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) + message(FATAL_ERROR "CHIP_DEVICE_ROTATING_DEVICE_UID was not provided. To generate it use CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=y") + else() + string(APPEND script_args "--rd_uid \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n") + endif() + else() + string(APPEND script_args "--generate_rd_uid\n") + endif() + endif() + + if(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED OR CONFIG_CHIP_FACTORY_DATA_GENERATE_CD) + find_program(chip_cert_exe NAMES chip-cert REQUIRED) + string(APPEND script_args "--chip_cert_path ${chip_cert_exe}\n") + endif() + + if(CONFIG_CHIP_FACTORY_DATA_GENERATE_CD) + string(APPEND script_args "--gen_cd\n") + endif() + + # For development purpose user can use default certs instead of generating or providing them + if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS) + # Convert decimal VID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_VID "${CONFIG_CHIP_DEVICE_VENDOR_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_VID} 2 -1 raw_vid) + string(TOUPPER ${raw_vid} raw_vid_upper) + # Convert decimal PID to its hexadecimal representation to find out certification files in repository + math(EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID}" OUTPUT_FORMAT HEXADECIMAL) + string(SUBSTRING ${LOCAL_PID} 2 -1 raw_pid) + string(TOUPPER ${raw_pid} raw_pid_upper) + # All certs are located in ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/credentials/development/attestation + # it can be used during development without need to generate new certifications + string(APPEND script_args "--dac_cert \"${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Cert.der\"\n") + string(APPEND script_args "--dac_key \"${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Key.der\"\n") + string(APPEND script_args "--pai_cert \"${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/credentials/development/attestation/Matter-Development-PAI-${raw_vid_upper}-noPID-Cert.der\"\n") + elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER) + string(APPEND script_args "--dac_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT}\"\n") + string(APPEND script_args "--dac_key \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY}\"\n") + string(APPEND script_args "--pai_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT}\"\n") + elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED) + string(APPEND script_args "--gen_certs\n") + endif() + + # Add Password-Authenticated Key Exchange parameters + string(APPEND script_args "--spake2_it \"${CONFIG_CHIP_DEVICE_SPAKE2_IT}\"\n") + string(APPEND script_args "--spake2_salt \"${CONFIG_CHIP_DEVICE_SPAKE2_SALT}\"\n") + string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n") + string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n") + string(APPEND script_args "--include_passcode\n") + string(APPEND script_args "--overwrite\n") + # Check if spake2 verifier should be generated using script + if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER) + # Spake2 verifier should be provided using kConfig + string(APPEND script_args "--spake2_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n") + endif() + + # Product appearance + string(APPEND script_args "--product_finish ${CONFIG_CHIP_DEVICE_PRODUCT_FINISH}\n") + if(CONFIG_CHIP_DEVICE_PRODUCT_COLOR) + string(APPEND script_args "--product_color ${CONFIG_CHIP_DEVICE_PRODUCT_COLOR}\n") + endif() + + if(CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES) + string(APPEND script_args "--generate_onboarding\n") + endif() + + if(CONFIG_CHIP_DEVICE_ENABLE_KEY) + # Add optional EnableKey that triggers user-specific action. + string(APPEND script_args "--enable_key \"${CONFIG_CHIP_DEVICE_ENABLE_KEY}\"\n") + endif() + + # Set output path and path to SCHEMA file to validate generated factory data + set(factory_data_output_path ${output_path}/${factory_data_target}) + string(APPEND script_args "-o \"${factory_data_output_path}\"\n") + string(APPEND script_args "-s \"${schema_path}\"\n") + + # Add optional offset and size arguments to generate .hex file as well as .json. + if(SB_CONFIG_PARTITION_MANAGER) + string(APPEND script_args "--offset $\n") + string(APPEND script_args "--size $\n") + else() + include(${CMAKE_BINARY_DIR}/${DEFAULT_IMAGE}/zephyr/dts.cmake) + + get_target_property(factory_data_alias devicetree_target "DT_ALIAS|factory-data") + get_target_property(factory_data_address devicetree_target "DT_REG|${factory_data_alias}|ADDR") + get_target_property(factory_data_size devicetree_target "DT_REG|${factory_data_alias}|SIZE") + + # remove ; from address and size properties + string(SUBSTRING ${factory_data_address} 0 -1 factory_data_address) + string(SUBSTRING ${factory_data_size} 0 -1 factory_data_size) + if(NOT (DEFINED factory_data_alias AND DEFINED factory_data_address AND DEFINED factory_data_size)) + message(FATAL_ERROR "factory-data alias does not exist in DTS") + endif() + + string(APPEND script_args "--offset ${factory_data_address}\n") + string(APPEND script_args "--size ${factory_data_size}\n") + endif() + + # Execute first script to create a JSON file + separate_arguments(separated_script_args NATIVE_COMMAND ${script_args}) + add_custom_command( + OUTPUT ${factory_data_output_path}.hex + DEPENDS ${FACTORY_DATA_SCRIPT_PATH} + COMMAND ${Python3_EXECUTABLE} ${FACTORY_DATA_SCRIPT_PATH} ${separated_script_args} + COMMENT "Generating new Factory Data..." + ) + add_custom_target(${factory_data_target} ALL + DEPENDS ${factory_data_output_path}.hex + ) +endfunction() + +# Generate factory data partition using given args +# +# +# During generation process a some file will be created in zephyr's build directory: +# - merged.hex a file containing firmware and factory data merged to single file +# - factory_data.hex a file containing only a factory data partition including proper offset +# +function(nrfconnect_generate_factory_data) + if(NOT ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR) + message(FATAL_ERROR "ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR variable is not set, ensure the matter module is in your manifest") + endif() + + # Localize all scripts needed to generate factory data partition + set(FACTORY_DATA_SCRIPT_PATH ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py) + set(GENERATE_CBOR_SCRIPT_PATH ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/scripts/tools/nrfconnect/nrfconnect_generate_partition.py) + set(FACTORY_DATA_SCHEMA_PATH ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/scripts/tools/nrfconnect/nrfconnect_factory_data.schema) + set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/${DEFAULT_IMAGE}/zephyr) + + # Create a .hex file with factory data in CBOR format based on the JSON file created previously + nrfconnect_create_factory_data(factory_data + ${FACTORY_DATA_SCRIPT_PATH} + ${FACTORY_DATA_SCHEMA_PATH} + ${OUTPUT_FILE_PATH} + ${DEFAULT_IMAGE} + ) + + if(SB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE) + if(SB_CONFIG_PARTITION_MANAGER) + # Set custom target for merging factory_data hex file + set_property(GLOBAL PROPERTY factory_data_PM_HEX_FILE ${OUTPUT_FILE_PATH}/factory_data.hex) + set_property(GLOBAL PROPERTY factory_data_PM_TARGET factory_data) + else() + add_custom_command(OUTPUT ${OUTPUT_FILE_PATH}/merged.hex + COMMAND + ${PYTHON_EXECUTABLE} + ${ZEPHYR_BASE}/scripts/build/mergehex.py + -o ${OUTPUT_FILE_PATH}/merged.hex + ${OUTPUT_FILE_PATH}/factory_data.hex + ${OUTPUT_FILE_PATH}/zephyr.hex + DEPENDS + ${DEFAULT_IMAGE}_extra_byproducts + factory_data + ${OUTPUT_FILE_PATH}/factory_data.hex + ${OUTPUT_FILE_PATH}/zephyr.hex + ) + + # Wrapper target for the merge command. + add_custom_target(merged_hex + ALL DEPENDS + ${OUTPUT_FILE_PATH}/merged.hex + ) + endif() + endif() +endfunction() diff --git a/config/zephyr/ota-image_sysbuild.cmake b/config/zephyr/ota-image_sysbuild.cmake new file mode 100644 index 00000000000000..2bd78ea6ee5afb --- /dev/null +++ b/config/zephyr/ota-image_sysbuild.cmake @@ -0,0 +1,102 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Create CMake target for building Matter OTA (Over-the-air update) image. +# +# Required arguments: +# INPUT_FILES file1[, file2...] Binary files to be included in Matter OTA image +# OUTPUT_FILE file Location of generated Matter OTA image +# +function(chip_ota_image TARGET_NAME) + cmake_parse_arguments(ARG "" "OUTPUT_FILE" "INPUT_FILES" ${ARGN}) + + if(NOT ARG_INPUT_FILES OR NOT ARG_OUTPUT_FILE) + message(FATAL_ERROR "Both INPUT_FILES and OUTPUT_FILE arguments must be specified") + endif() + + sysbuild_get(CONFIG_CHIP_DEVICE_SOFTWARE_VERSION IMAGE ${DEFAULT_IMAGE} VAR CONFIG_CHIP_DEVICE_SOFTWARE_VERSION KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING IMAGE ${DEFAULT_IMAGE} VAR CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_VENDOR_ID IMAGE ${DEFAULT_IMAGE} VAR CONFIG_CHIP_DEVICE_VENDOR_ID KCONFIG) + sysbuild_get(CONFIG_CHIP_DEVICE_PRODUCT_ID IMAGE ${DEFAULT_IMAGE} VAR CONFIG_CHIP_DEVICE_PRODUCT_ID KCONFIG) + + # Prepare ota_image_tool.py argument list + if(EXISTS ${APP_DIR}/VERSION) + file(READ ${APP_DIR}/VERSION ver) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${APP_DIR}/VERSION) + string(REGEX MATCH "VERSION_MAJOR = ([0-9]*)" _ ${ver}) + set(app_version_major ${CMAKE_MATCH_1}) + string(REGEX MATCH "VERSION_MINOR = ([0-9]*)" _ ${ver}) + set(app_version_minor ${CMAKE_MATCH_1}) + string(REGEX MATCH "PATCHLEVEL = ([0-9]*)" _ ${ver}) + set(app_version_patchlevel ${CMAKE_MATCH_1}) + string(REGEX MATCH "VERSION_TWEAK = ([0-9]*)" _ ${ver}) + set(app_version_tweak ${CMAKE_MATCH_1}) + + set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}+${app_version_tweak}") + math(EXPR APPVERSION "(${app_version_major} << 24) | (${app_version_minor} << 16) | (${app_version_patchlevel} << 8) | ${app_version_tweak}" OUTPUT_FORMAT HEXADECIMAL) + + set(OTA_ARGS + "--vendor-id" + ${CONFIG_CHIP_DEVICE_VENDOR_ID} + "--product-id" + ${CONFIG_CHIP_DEVICE_PRODUCT_ID} + "--version" + ${APPVERSION} + "--version-str" + ${APP_VERSION_STRING} + "--digest-algorithm" + "sha256" + ) + else() + set(OTA_ARGS + "--vendor-id" + ${CONFIG_CHIP_DEVICE_VENDOR_ID} + "--product-id" + ${CONFIG_CHIP_DEVICE_PRODUCT_ID} + "--version" + ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION} + "--version-str" + ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING} + "--digest-algorithm" + "sha256" + ) + endif() + + separate_arguments(OTA_EXTRA_ARGS NATIVE_COMMAND "${CHIP_OTA_IMAGE_EXTRA_ARGS}") + + list(APPEND OTA_ARGS ${OTA_EXTRA_ARGS}) + list(APPEND OTA_ARGS ${ARG_INPUT_FILES}) + list(APPEND OTA_ARGS ${ARG_OUTPUT_FILE}) + + # Convert the argument list to multi-line string + string(REPLACE ";" "\n" OTA_ARGS "${OTA_ARGS}") + + # Pass the argument list via file to avoid hitting Windows command-line length limit + file(GENERATE + OUTPUT ${ARG_OUTPUT_FILE}.args + CONTENT ${OTA_ARGS} + ) + + add_custom_command(OUTPUT ${ARG_OUTPUT_FILE} + COMMAND ${Python3_EXECUTABLE} ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/src/app/ota_image_tool.py create @${ARG_OUTPUT_FILE}.args + DEPENDS ${ARG_INPUT_FILES} ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/src/app/ota_image_tool.py + ) + + add_custom_target(${TARGET_NAME} ALL + DEPENDS ${ARG_OUTPUT_FILE} + ) +endfunction() diff --git a/docs/guides/nrfconnect_examples_software_update.md b/docs/guides/nrfconnect_examples_software_update.md index ebaf08f46a587f..9fc1f6e6e5bd3e 100644 --- a/docs/guides/nrfconnect_examples_software_update.md +++ b/docs/guides/nrfconnect_examples_software_update.md @@ -49,8 +49,8 @@ To test the DFU over Matter, you need to complete the following steps: 4. Run OTA Provider application with _matter.ota_ replaced with the path to the Matter OTA image which you wish to provide to the Matter device. Note that - the Matter OTA image is, by default, generated at _zephyr/matter.ota_ in the - example's build directory: + the Matter OTA image is, by default, generated in the example's build + directory: ``` $ out/provider/chip-ota-provider-app -f matter.ota @@ -180,10 +180,11 @@ Complete the following steps to perform DFU using mcumgr: that the Bluetooth LE advertising has started. See the user interface section in the example documentation to check the LED number. 4. Upload the application firmware image to the device by running the following - command in your example directory: + command in your example directory with the replaced by + your application name, for example `lock`: ``` - sudo mcumgr --conntype ble --hci ble-hci-number --connstring peer_name='ble-device-name' image upload build/zephyr/app_update.bin -n 0 -w 1 + sudo mcumgr --conntype ble --hci ble-hci-number --connstring peer_name='ble-device-name' image upload build//zephyr/zephyr.signed.bin -n 0 -w 1 ``` The operation can take a few minutes. Wait until the progress bar reaches @@ -246,10 +247,11 @@ Complete the following steps to perform DFU using mcumgr: go straight to the step 8. a. Upload the network core firmware image to the device by running the - following command in your example directory: + following command in your example directory with the + replaced by your network image name, for example `ipc_radio`: ``` - sudo mcumgr --conntype ble --hci ble-hci-number --connstring peer_name='ble-device-name' image upload build/zephyr/net_core_app_update.bin -n 1 -w 1 + sudo mcumgr --conntype ble --hci ble-hci-number --connstring peer_name='ble-device-name' image upload build/signed_by_mcuboot_and_b0_.bin -n 1 -w 1 ``` The operation can take a few minutes. Wait until the progress bar reaches diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index 212963d5266b66..27595e2888d616 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -635,7 +635,7 @@ For example, the build command for the nRF52840 DK could look like this: ``` $ west build -b nrf52840dk_nrf52840 -- \ -DCONFIG_CHIP_FACTORY_DATA=y \ --DCONFIG_CHIP_FACTORY_DATA_BUILD=y \ +-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \ -DCONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES=y ``` @@ -760,13 +760,13 @@ $ python scripts/tools/nrfconnect/nrfconnect_generate_partition.py -h **Example of the command for the nRF52840 DK:** ``` -$ python scripts/tools/nrfconnect/nrfconnect_generate_partition.py -i build/zephyr/factory_data.json -o build/zephyr/factory_data --offset 0xfb000 --size 0x1000 +$ python scripts/tools/nrfconnect/nrfconnect_generate_partition.py -i build/light_bulb/zephyr/factory_data.json -o build/light_bulb/zephyr/factory_data --offset 0xfb000 --size 0x1000 ``` As a result, `factory_data.hex` and `factory_data.bin` files are created in the -`/build/zephyr/` directory. The first file contains the memory offset. For this -reason, it can be programmed directly to the device using a programmer (for -example, `nrfjprog`). +`/build/light_bulb/zephyr/` directory. The first file contains the memory +offset. For this reason, it can be programmed directly to the device using a +programmer (for example, `nrfjprog`).
@@ -783,11 +783,11 @@ directory and build the example with the following option (replace `nrf52840dk_nrf52840` with your board name): ``` -$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y -DCONFIG_CHIP_FACTORY_DATA_BUILD=y +$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y -DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y ``` -Alternatively, you can also add `CONFIG_CHIP_FACTORY_DATA_BUILD=y` Kconfig -setting to the example's `prj.conf` file. +Alternatively, you can also add `SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y` +Kconfig setting to the example's `sysbuild.conf` file. Each factory data parameter has a default value. These are described in the [Kconfig file](../../config/nrfconnect/chip-module/Kconfig). Setting a new value @@ -802,7 +802,7 @@ them as an additional option for the west command. For example (replace `nrf52840dk_nrf52840` with own board name): ``` -$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y --DCONFIG_CHIP_FACTORY_DATA_BUILD=y --DCONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF11 +$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y --DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y --DCONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF11 ``` Alternatively, you can add the relevant Kconfig option lines to the example's @@ -916,32 +916,32 @@ $ nrfjprog --family NRF52 --program factory_data.hex ``` > Note: For more information about how to use the `nrfjprog` utility, visit -> [Nordic Semiconductor's Infocenter](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf_cltools%2FUG%2Fcltools%2Fnrf_nrfjprogexe.html). +> [Programming SoCs with nrfjprog](https://docs.nordicsemi.com/bundle/ug_nrf_cltools/page/UG/cltools/nrf_nrfjprogexe.html) Another way to program the factory data to a device is to use the nRF Connect platform build system described in [Building an example with factory data](#building-an-example-with-factory-data), and build an example with the additional option -`-DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y`: +`-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y`: ``` $ west build -b nrf52840dk_nrf52840 -- \ -DCONFIG_CHIP_FACTORY_DATA=y \ --DCONFIG_CHIP_FACTORY_DATA_BUILD=y \ --DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y +-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \ +-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y ``` You can also build an example with auto-generation of new CD, DAC and PAI certificates. The newly generated certificates will be added to factory data set automatically. To generate new certificates disable using default certificates by building an example with the additional option -`-DCHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n`: +`-DCONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n`: ``` $ west build -b nrf52840dk_nrf52840 -- \ -DCONFIG_CHIP_FACTORY_DATA=y \ --DCONFIG_CHIP_FACTORY_DATA_BUILD=y \ --DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y \ +-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \ +-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y \ -DCONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n ``` diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 563295e059b46c..8b5c3c1c9e72fd 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -23,15 +23,6 @@ get_filename_component(ENERGY_MANAGEMENT_COMMON_DIR ${CHIP_ROOT}/examples/energy include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) -set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root) - -if(DEFINED CONF_FILE AND NOT CONF_FILE STREQUAL "prj.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -43,6 +34,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-all-clusters-app-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/all-clusters-app/nrfconnect/Kconfig.sysbuild b/examples/all-clusters-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..6d6f1d811109a9 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,67 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index 4da8bbcd8ac81b..78bdefbd4452da 100644 --- a/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -38,6 +38,3 @@ CONFIG_MATTER_LOG_LEVEL_INF=y # Use partition manager to configure the settings partition not to overlap with Open Bootloader CONFIG_PM_SINGLE_IMAGE=y - -# Enable CHIP pairing automatically on application start. -CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj.conf b/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf b/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf b/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf52840dk_nrf52840_dfu.yml similarity index 100% rename from examples/all-clusters-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf52840dk_nrf52840_dfu.yml diff --git a/examples/all-clusters-minimal-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml similarity index 100% rename from examples/all-clusters-minimal-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml diff --git a/examples/light-switch-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml similarity index 100% rename from examples/light-switch-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml diff --git a/examples/lighting-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml similarity index 100% rename from examples/lighting-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml diff --git a/examples/all-clusters-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_dfu.yml similarity index 100% rename from examples/all-clusters-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_dfu.yml diff --git a/examples/light-switch-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml similarity index 100% rename from examples/light-switch-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml diff --git a/examples/all-clusters-app/nrfconnect/prj.conf b/examples/all-clusters-app/nrfconnect/prj.conf index dfb604a06349c1..5917c3a9c7a17e 100644 --- a/examples/all-clusters-app/nrfconnect/prj.conf +++ b/examples/all-clusters-app/nrfconnect/prj.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/prj_dfu.conf index 3b5937b4073d9a..1925502dcad410 100644 --- a/examples/all-clusters-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-app/nrfconnect/prj_dfu.conf @@ -24,6 +24,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/prj_release.conf b/examples/all-clusters-app/nrfconnect/prj_release.conf index 714fa9dd4ab740..b98004283b64b9 100644 --- a/examples/all-clusters-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-app/nrfconnect/prj_release.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild.conf b/examples/all-clusters-app/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..e63a92c6b2bbab --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild.conf @@ -0,0 +1,18 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=n diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..694c3b08242f29 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay similarity index 90% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay rename to examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 9f9128c6beff60..054f04712058a3 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -1,5 +1,7 @@ /* + * * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +18,7 @@ / { chosen { + zephyr,code-partition = &boot_partition; nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay similarity index 90% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay rename to examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay index 9f9128c6beff60..054f04712058a3 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -1,5 +1,7 @@ /* + * * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +18,7 @@ / { chosen { + zephyr,code-partition = &boot_partition; nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..81701b7eb63f70 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# nRF7002DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +CONFIG_MULTITHREADING=y +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay similarity index 90% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay rename to examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay index 9f9128c6beff60..054f04712058a3 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -1,5 +1,7 @@ /* + * * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +18,7 @@ / { chosen { + zephyr,code-partition = &boot_partition; nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/prj.conf similarity index 62% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj.conf rename to examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/prj.conf index 3f43b733b4bb96..3bcb12fe7b8d25 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj.conf +++ b/examples/all-clusters-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -14,17 +14,36 @@ # limitations under the License. # -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + # Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=n CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf b/examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf new file mode 100644 index 00000000000000..edaaa8394e0155 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild_dfu.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=y +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y diff --git a/examples/all-clusters-app/nrfconnect/sysbuild_release.conf b/examples/all-clusters-app/nrfconnect/sysbuild_release.conf new file mode 100644 index 00000000000000..edaaa8394e0155 --- /dev/null +++ b/examples/all-clusters-app/nrfconnect/sysbuild_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=y +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt index 2e5c3fbbf1102f..08feb83a62a40b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt @@ -22,14 +22,6 @@ get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-cluster include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - -if(DEFINED CONF_FILE AND NOT CONF_FILE STREQUAL "prj.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -41,6 +33,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-all-clusters-minimal-app-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/all-clusters-minimal-app/nrfconnect/Kconfig.sysbuild b/examples/all-clusters-minimal-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..6d6f1d811109a9 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,67 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index 4da8bbcd8ac81b..78bdefbd4452da 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -38,6 +38,3 @@ CONFIG_MATTER_LOG_LEVEL_INF=y # Use partition manager to configure the settings partition not to overlap with Open Bootloader CONFIG_PM_SINGLE_IMAGE=y - -# Enable CHIP pairing automatically on application start. -CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_dfu.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_dfu.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/all-clusters-minimal-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/all-clusters-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf52840dk_nrf52840_dfu.yml similarity index 100% rename from examples/all-clusters-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf52840dk_nrf52840_dfu.yml diff --git a/examples/all-clusters-minimal-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml similarity index 100% rename from examples/all-clusters-minimal-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml diff --git a/examples/lit-icd-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml similarity index 100% rename from examples/lit-icd-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_dfu.yml diff --git a/examples/lock-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml similarity index 100% rename from examples/lock-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/all-clusters-minimal-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/prj.conf index 0491fbb825666f..58dae15804fe81 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf index a96c97d2517580..46535f44bd21e4 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf index e885563a98618f..4d81894306b6ca 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..e63a92c6b2bbab --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild.conf @@ -0,0 +1,18 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..694c3b08242f29 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_dfu.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay similarity index 90% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay rename to examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay index 50069180506973..054f04712058a3 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -1,5 +1,7 @@ /* + * * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,8 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + / { chosen { + zephyr,code-partition = &boot_partition; nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..81701b7eb63f70 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# nRF7002DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +CONFIG_MULTITHREADING=y +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/prj.conf similarity index 62% rename from examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj_release.conf rename to examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/prj.conf index 3f43b733b4bb96..3bcb12fe7b8d25 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -14,17 +14,36 @@ # limitations under the License. # -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + # Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=n CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild_dfu.conf new file mode 100644 index 00000000000000..7151539bc715fc --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild_dfu.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=y +SB_CONFIG_BOOTLOADER_MCUBOOT=y + diff --git a/examples/all-clusters-minimal-app/nrfconnect/sysbuild_release.conf b/examples/all-clusters-minimal-app/nrfconnect/sysbuild_release.conf new file mode 100644 index 00000000000000..edaaa8394e0155 --- /dev/null +++ b/examples/all-clusters-minimal-app/nrfconnect/sysbuild_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=y +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y diff --git a/examples/chef/chef.py b/examples/chef/chef.py index c4b7aa8aca162b..cecbf646ffeedf 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -199,6 +199,7 @@ def bundle_nrfconnect(device_name: str) -> None: nrf_root = os.path.join(_CHEF_SCRIPT_PATH, "nrfconnect", "build", + "nrfconnect", "zephyr") scripts_root = os.path.join(_REPO_BASE_PATH, "scripts", @@ -723,9 +724,10 @@ def main() -> int: f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}") elif options.build_target == "nrfconnect": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") - nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"] + nrf_build_cmds = ["west build -b nrf52840dk/nrf52840"] if options.do_clean: nrf_build_cmds.append("-p always") + nrf_build_cmds.append("--sysbuild") nrf_build_cmds.append("--") if options.do_rpc: nrf_build_cmds.append("-DOVERLAY_CONFIG=rpc.overlay") @@ -736,7 +738,7 @@ def main() -> int: nrf_build_cmds.append( f"-DCONFIG_CHIP_DEVICE_PRODUCT_NAME='\"{options.pname}\"'") nrf_build_cmds.append( - f"-DSAMPLE_NAME={options.sample_device_type_name}") + f"-DCONFIG_CHEF_DEVICE_TYPE='\"{options.sample_device_type_name}\"'") nrf_build_cmds.append( f"-DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING='\"{sw_ver_string}\"'") diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 98f5cdeafdca75..081c510435c1e6 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -21,8 +21,6 @@ get_filename_component(CHEF ${CMAKE_CURRENT_SOURCE_DIR}/../ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH) - set(CONF_FILE prj.conf) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -31,10 +29,6 @@ message(STATUS "Product ID " ${CONFIG_CHIP_DEVICE_PRODUCT_ID}) message(STATUS "Product Name " ${CONFIG_CHIP_DEVICE_PRODUCT_NAME}) message(STATUS "SW Version String" ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING}) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf) @@ -43,8 +37,11 @@ endif() find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +get_filename_component(GEN_DIR ${CHEF}/out/${CONFIG_CHEF_DEVICE_TYPE}/zap-generated REALPATH) + project(chip-nrfconnect-chef-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) @@ -107,10 +104,10 @@ target_sources(app PRIVATE ${CHEF}/nrfconnect/main.cpp ) -message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap) +message(STATUS ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap) chip_configure_data_model(app INCLUDE_SERVER - ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap + ZAP_FILE ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap ) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) diff --git a/examples/chef/nrfconnect/Kconfig b/examples/chef/nrfconnect/Kconfig index 2b1125e68bbef6..f5ef9cd1aa1e2c 100644 --- a/examples/chef/nrfconnect/Kconfig +++ b/examples/chef/nrfconnect/Kconfig @@ -15,6 +15,12 @@ # mainmenu "Matter nRF Connect Chef Example Application" +config CHEF_DEVICE_TYPE + string "Chef app device type" + default "" + help + Specifies the device type used to generate data model for the chef app. It should be the string literal matching one of the file names located in the chef's devices directory. + rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults" rsource "../../../config/nrfconnect/chip-module/Kconfig.features" source "Kconfig.zephyr" diff --git a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/chef/nrfconnect/Kconfig.sysbuild similarity index 60% rename from examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf rename to examples/chef/nrfconnect/Kconfig.sysbuild index 48deaa9fa18135..b3e964a82b5439 100644 --- a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ b/examples/chef/nrfconnect/Kconfig.sysbuild @@ -14,12 +14,16 @@ # limitations under the License. # -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/chef/nrfconnect/prj.conf b/examples/chef/nrfconnect/prj.conf index 03c7e188675c95..2f310436a50202 100644 --- a/examples/chef/nrfconnect/prj.conf +++ b/examples/chef/nrfconnect/prj.conf @@ -47,9 +47,13 @@ CONFIG_CHIP_PROJECT_CONFIG="CHIPProjectConfig.h" # 32773 == 0x8005 (example lighting-app) CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 -# Enable CHIP pairing automatically on application start. +# Enable Matter pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Configure CHIP shell CONFIG_CHIP_LIB_SHELL=y CONFIG_OPENTHREAD_SHELL=y diff --git a/examples/chef/nrfconnect/sysbuild.conf b/examples/chef/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..e63a92c6b2bbab --- /dev/null +++ b/examples/chef/nrfconnect/sysbuild.conf @@ -0,0 +1,18 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y +SB_CONFIG_MATTER_OTA=n diff --git a/examples/chef/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/chef/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/chef/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/chef/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/chef/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/chef/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/chef/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/chef/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/chef/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index abd1a0c6d1a2b0..48329e053be562 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -22,15 +22,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) -set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -42,6 +33,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-light-switch-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/light-switch-app/nrfconnect/Kconfig.sysbuild b/examples/light-switch-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..4a0b8f3656b1eb --- /dev/null +++ b/examples/light-switch-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj.conf b/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf b/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf b/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay b/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/light-switch-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 90969a32dbc414..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n -CONFIG_GPIO=n diff --git a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/light-switch-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/light-switch-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml similarity index 100% rename from examples/light-switch-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml diff --git a/examples/lighting-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml similarity index 100% rename from examples/lighting-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml diff --git a/examples/pump-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml similarity index 100% rename from examples/pump-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml diff --git a/examples/pump-controller-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml similarity index 100% rename from examples/pump-controller-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml diff --git a/examples/lighting-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml similarity index 100% rename from examples/lighting-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml diff --git a/examples/lock-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml similarity index 100% rename from examples/lock-app/nrfconnect/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/light-switch-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml diff --git a/examples/light-switch-app/nrfconnect/prj.conf b/examples/light-switch-app/nrfconnect/prj.conf index dd75cdf99c4fd1..4ece5671b2f6df 100644 --- a/examples/light-switch-app/nrfconnect/prj.conf +++ b/examples/light-switch-app/nrfconnect/prj.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf b/examples/light-switch-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index def17d5345e22c..00000000000000 --- a/examples/light-switch-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32772 == 0x8004 (example light-switch-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y - -# General networking settings -CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=14 - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterSwitch" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n - -# Enable the Read Client for binding purposes -CONFIG_CHIP_ENABLE_READ_CLIENT=y diff --git a/examples/light-switch-app/nrfconnect/prj_release.conf b/examples/light-switch-app/nrfconnect/prj_release.conf index c57d5eb42bf168..74d128e682584e 100644 --- a/examples/light-switch-app/nrfconnect/prj_release.conf +++ b/examples/light-switch-app/nrfconnect/prj_release.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32772 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf b/examples/light-switch-app/nrfconnect/sysbuild.conf similarity index 90% rename from examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf rename to examples/light-switch-app/nrfconnect/sysbuild.conf index cd9aab4101c6f5..d0c5eee2b93c39 100644 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf +++ b/examples/light-switch-app/nrfconnect/sysbuild.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,4 +14,4 @@ # limitations under the License. # -CONFIG_GPIO=y +SB_CONFIG_MATTER=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..694c3b08242f29 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..81701b7eb63f70 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# nRF7002DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +CONFIG_MULTITHREADING=y +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/prj.conf similarity index 59% rename from examples/light-switch-app/nrfconnect/child_image/mcuboot/prj.conf rename to examples/light-switch-app/nrfconnect/sysbuild/mcuboot/prj.conf index 90969a32dbc414..3bcb12fe7b8d25 100644 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/prj.conf +++ b/examples/light-switch-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,17 +14,36 @@ # limitations under the License. # -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + # Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=n CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 04dacfac4af308..5b2647894e9ffb 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -22,20 +22,12 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) -set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf" AND NOT BOARD STREQUAL "nrf52840dongle_nrf52840") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(chip-nrfconnect-lighting-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lighting-app/nrfconnect/Kconfig.sysbuild b/examples/lighting-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..4048c88bf51f0f --- /dev/null +++ b/examples/lighting-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,79 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +config MATTER_OTA + default n if BOARD_NRF52840DONGLE_NRF52840 + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT if !BOARD_NRF52840DONGLE_NRF52840 +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y if !BOARD_NRF52840DONGLE_NRF52840 + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf similarity index 93% rename from examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf rename to examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index 01eedaf2e36856..db5151dc6c7ef4 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -41,3 +41,9 @@ CONFIG_PM_SINGLE_IMAGE=y # Disable factory data support. CONFIG_CHIP_FACTORY_DATA=n CONFIG_CHIP_FACTORY_DATA_BUILD=n + +# Disable Matter OTA DFU +CONFIG_CHIP_OTA_REQUESTOR=n + +# Disable QSPI NOR +CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj.conf b/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf b/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf deleted file mode 100644 index cd9aab4101c6f5..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -CONFIG_GPIO=y diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf deleted file mode 100644 index cd9aab4101c6f5..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -CONFIG_GPIO=y diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay b/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/lighting-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 90969a32dbc414..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n -CONFIG_GPIO=n diff --git a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lighting-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h index 7e997d723549d2..4baa186190f638 100644 --- a/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h @@ -26,8 +26,3 @@ */ #pragma once - -// Switching from Thread child to router may cause a few second packet stall. -// Until this is improved in OpenThread we need to increase the retransmission -// interval to survive the stall. -#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (1000_ms32) diff --git a/examples/lit-icd-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml similarity index 100% rename from examples/lit-icd-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml diff --git a/examples/lock-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml similarity index 100% rename from examples/lock-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/lighting-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml diff --git a/examples/lighting-app/nrfconnect/pm_static_nrf52840dongle_nrf52840_no_dfu.yml b/examples/lighting-app/nrfconnect/pm_static_nrf52840dongle_nrf52840.yml similarity index 100% rename from examples/lighting-app/nrfconnect/pm_static_nrf52840dongle_nrf52840_no_dfu.yml rename to examples/lighting-app/nrfconnect/pm_static_nrf52840dongle_nrf52840.yml diff --git a/examples/window-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml b/examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml similarity index 100% rename from examples/window-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static_dfu.yml rename to examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml diff --git a/examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/lighting-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml b/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..3c56dc0ddb1968 --- /dev/null +++ b/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0xC000 + region: flash_primary +mcuboot_pad: + address: 0xC000 + size: 0x200 +app: + address: 0xC200 + size: 0xeee00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xC000 + size: 0xef000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xC200 + size: 0xeee00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xef000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xef000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x12f000 + size: 0x6D1000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml b/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..3c56dc0ddb1968 --- /dev/null +++ b/examples/lighting-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0xC000 + region: flash_primary +mcuboot_pad: + address: 0xC000 + size: 0x200 +app: + address: 0xC200 + size: 0xeee00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xC000 + size: 0xef000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xC200 + size: 0xeee00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xef000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xef000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x12f000 + size: 0x6D1000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index 38c8be587d5600..c4f521be6960ea 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -25,9 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 CONFIG_STD_CPP17=y -# Enable CHIP pairing automatically on application start. +# Enable Matter pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y CONFIG_PWM=y diff --git a/examples/lighting-app/nrfconnect/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index 22cdc2b700ee9f..00000000000000 --- a/examples/lighting-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32773 == 0x8005 (example lighting-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 -CONFIG_STD_CPP17=y - -# Enable CHIP pairing automatically on application start. -CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y -CONFIG_PWM=y - -# General networking settings -CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=14 - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterLight" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Stack size settings -CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/lighting-app/nrfconnect/prj_release.conf b/examples/lighting-app/nrfconnect/prj_release.conf index 4468a07e40b088..a51ed89060d0e6 100644 --- a/examples/lighting-app/nrfconnect/prj_release.conf +++ b/examples/lighting-app/nrfconnect/prj_release.conf @@ -25,9 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32773 CONFIG_STD_CPP17=y -# Enable CHIP pairing automatically on application start. +# Enable Matter pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y CONFIG_PWM=y diff --git a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lighting-app/nrfconnect/sysbuild.conf similarity index 90% rename from examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf rename to examples/lighting-app/nrfconnect/sysbuild.conf index cd9aab4101c6f5..d0c5eee2b93c39 100644 --- a/examples/all-clusters-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/examples/lighting-app/nrfconnect/sysbuild.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,4 +14,4 @@ # limitations under the License. # -CONFIG_GPIO=y +SB_CONFIG_MATTER=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..694c3b08242f29 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..81701b7eb63f70 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# nRF7002DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +CONFIG_MULTITHREADING=y +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lighting-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/prj.conf similarity index 59% rename from examples/lighting-app/nrfconnect/child_image/mcuboot/prj.conf rename to examples/lighting-app/nrfconnect/sysbuild/mcuboot/prj.conf index 90969a32dbc414..3bcb12fe7b8d25 100644 --- a/examples/lighting-app/nrfconnect/child_image/mcuboot/prj.conf +++ b/examples/lighting-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,17 +14,36 @@ # limitations under the License. # -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + # Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=n CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/lit-icd-app/nrfconnect/CMakeLists.txt b/examples/lit-icd-app/nrfconnect/CMakeLists.txt index a9b921016670e7..36133c49ec12d1 100644 --- a/examples/lit-icd-app/nrfconnect/CMakeLists.txt +++ b/examples/lit-icd-app/nrfconnect/CMakeLists.txt @@ -21,14 +21,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -40,6 +32,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-lit-icd-app-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lit-icd-app/nrfconnect/Kconfig.sysbuild b/examples/lit-icd-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..8877de44e2d570 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index 48deaa9fa18135..00000000000000 --- a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index 48deaa9fa18135..00000000000000 --- a/examples/lit-icd-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml similarity index 100% rename from examples/pump-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml diff --git a/examples/pump-controller-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml similarity index 100% rename from examples/pump-controller-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/lit-icd-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml diff --git a/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lit-icd-app/nrfconnect/prj.conf b/examples/lit-icd-app/nrfconnect/prj.conf index 950be7c8c394e4..a21c89fd5c0009 100644 --- a/examples/lit-icd-app/nrfconnect/prj.conf +++ b/examples/lit-icd-app/nrfconnect/prj.conf @@ -23,6 +23,13 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/lit-icd-app/nrfconnect/prj_no_dfu.conf b/examples/lit-icd-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index 00607e349a31ab..00000000000000 --- a/examples/lit-icd-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterLIT" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n - -# Enable LIT ICD configuration -CONFIG_CHIP_ENABLE_ICD_SUPPORT=y -CONFIG_CHIP_ICD_LIT_SUPPORT=y diff --git a/examples/lit-icd-app/nrfconnect/prj_release.conf b/examples/lit-icd-app/nrfconnect/prj_release.conf index 61b6b3dfc6f8f8..9ae438428f602d 100644 --- a/examples/lit-icd-app/nrfconnect/prj_release.conf +++ b/examples/lit-icd-app/nrfconnect/prj_release.conf @@ -23,6 +23,13 @@ CONFIG_CHIP=y CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lit-icd-app/nrfconnect/sysbuild.conf similarity index 90% rename from examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf rename to examples/lit-icd-app/nrfconnect/sysbuild.conf index cd9aab4101c6f5..d0c5eee2b93c39 100644 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/examples/lit-icd-app/nrfconnect/sysbuild.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,4 +14,4 @@ # limitations under the License. # -CONFIG_GPIO=y +SB_CONFIG_MATTER=y diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/prj.conf b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/prj.conf new file mode 100644 index 00000000000000..3bcb12fe7b8d25 --- /dev/null +++ b/examples/lit-icd-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -0,0 +1,49 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index 38e99561b3bbce..6c92305f378dec 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -cmake_minimum_required(VERSION 3.13.1) +cmake_minimum_required(VERSION 3.20.0) get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH) @@ -21,15 +21,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) -set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -41,6 +32,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-lock-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lock-app/nrfconnect/Kconfig.sysbuild b/examples/lock-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..4a0b8f3656b1eb --- /dev/null +++ b/examples/lock-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if (SOC_SERIES_NRF53X) && !WIFI_NRF700X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj.conf b/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf b/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf b/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf deleted file mode 100644 index 1622ffd00dbb91..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/hci_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.hci_rpmsg.defaults to set options common for all -# samples using hci_rpmsg. This file should contain only options specific for this sample -# hci_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf deleted file mode 100644 index cd9aab4101c6f5..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -CONFIG_GPIO=y diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf deleted file mode 100644 index cd9aab4101c6f5..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -CONFIG_GPIO=y diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay b/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/lock-app/nrfconnect/child_image/mcuboot/prj.conf deleted file mode 100644 index 90969a32dbc414..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/prj.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n -CONFIG_GPIO=n diff --git a/examples/lock-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/lock-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 90969a32dbc414..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n -CONFIG_GPIO=n diff --git a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/lock-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/window-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml b/examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml similarity index 100% rename from examples/window-app/nrfconnect/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml rename to examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml diff --git a/examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml b/examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/lock-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/lock-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml b/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..3c56dc0ddb1968 --- /dev/null +++ b/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0xC000 + region: flash_primary +mcuboot_pad: + address: 0xC000 + size: 0x200 +app: + address: 0xC200 + size: 0xeee00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xC000 + size: 0xef000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xC200 + size: 0xeee00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xef000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xef000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x12f000 + size: 0x6D1000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml b/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..3c56dc0ddb1968 --- /dev/null +++ b/examples/lock-app/nrfconnect/pm_static_nrf7002dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0xC000 + region: flash_primary +mcuboot_pad: + address: 0xC000 + size: 0x200 +app: + address: 0xC200 + size: 0xeee00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xC000 + size: 0xef000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xC200 + size: 0xeee00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xef000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xef000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x12f000 + size: 0x6D1000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/lock-app/nrfconnect/prj.conf b/examples/lock-app/nrfconnect/prj.conf index a12cb1e6594024..564882cf9c455a 100644 --- a/examples/lock-app/nrfconnect/prj.conf +++ b/examples/lock-app/nrfconnect/prj.conf @@ -25,6 +25,10 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 CONFIG_STD_CPP17=y +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/lock-app/nrfconnect/prj_no_dfu.conf b/examples/lock-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index 68cd0ea04a0923..00000000000000 --- a/examples/lock-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32774 == 0x8006 (example lock-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterLock" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/lock-app/nrfconnect/prj_release.conf b/examples/lock-app/nrfconnect/prj_release.conf index 24fc9cd1cbdef8..6a4580c265b384 100644 --- a/examples/lock-app/nrfconnect/prj_release.conf +++ b/examples/lock-app/nrfconnect/prj_release.conf @@ -25,6 +25,10 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32774 CONFIG_STD_CPP17=y +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf b/examples/lock-app/nrfconnect/sysbuild.conf similarity index 90% rename from examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf rename to examples/lock-app/nrfconnect/sysbuild.conf index cd9aab4101c6f5..d0c5eee2b93c39 100644 --- a/examples/light-switch-app/nrfconnect/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp_release.conf +++ b/examples/lock-app/nrfconnect/sysbuild.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,4 +14,4 @@ # limitations under the License. # -CONFIG_GPIO=y +SB_CONFIG_MATTER=y diff --git a/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..694c3b08242f29 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/boards/nrf7002dk_nrf5340_cpunet.conf @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y diff --git a/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/lock-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..81701b7eb63f70 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# nRF7002DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +CONFIG_MULTITHREADING=y +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/lock-app/nrfconnect/sysbuild/mcuboot/prj.conf b/examples/lock-app/nrfconnect/sysbuild/mcuboot/prj.conf new file mode 100644 index 00000000000000..3bcb12fe7b8d25 --- /dev/null +++ b/examples/lock-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -0,0 +1,49 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 7682c0ca663ffd..b599faaa1dd863 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -21,14 +21,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -40,6 +32,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-pump-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/pump-app/nrfconnect/Kconfig.sysbuild b/examples/pump-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..8877de44e2d570 --- /dev/null +++ b/examples/pump-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/pump-app/nrfconnect/child_image/mcuboot/prj.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/prj.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/pump-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml b/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml b/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/pump-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/pump-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/pump-app/nrfconnect/prj.conf b/examples/pump-app/nrfconnect/prj.conf index 8940955d52b403..91a87e89d916e6 100644 --- a/examples/pump-app/nrfconnect/prj.conf +++ b/examples/pump-app/nrfconnect/prj.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-app/nrfconnect/prj_no_dfu.conf b/examples/pump-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index 21cd8222c2c2e2..00000000000000 --- a/examples/pump-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32784 == 0x8010 (example pump-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterPump" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/pump-app/nrfconnect/prj_release.conf b/examples/pump-app/nrfconnect/prj_release.conf index ac2b6e09ade94d..8bf281aec7df38 100644 --- a/examples/pump-app/nrfconnect/prj_release.conf +++ b/examples/pump-app/nrfconnect/prj_release.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-app/nrfconnect/sysbuild.conf b/examples/pump-app/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..d0c5eee2b93c39 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y diff --git a/examples/pump-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/pump-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/pump-app/nrfconnect/sysbuild/mcuboot/prj.conf b/examples/pump-app/nrfconnect/sysbuild/mcuboot/prj.conf new file mode 100644 index 00000000000000..3bcb12fe7b8d25 --- /dev/null +++ b/examples/pump-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -0,0 +1,49 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index 52ece075e286ee..98d43aefafeb71 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -21,14 +21,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -40,6 +32,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-pump-controller-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/pump-controller-app/nrfconnect/Kconfig.sysbuild b/examples/pump-controller-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..8877de44e2d570 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/pump-controller-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml b/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840_relese.yml b/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840_relese.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/pm_static_nrf52840dk_nrf52840_relese.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/pump-controller-app/nrfconnect/prj.conf b/examples/pump-controller-app/nrfconnect/prj.conf index 857ad459b83707..4a134922c5f074 100644 --- a/examples/pump-controller-app/nrfconnect/prj.conf +++ b/examples/pump-controller-app/nrfconnect/prj.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index f4b60e647953ae..00000000000000 --- a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32785 == 0x8011 (example pump-controller-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 - -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterPumpCtrl" - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/pump-controller-app/nrfconnect/prj_release.conf b/examples/pump-controller-app/nrfconnect/prj_release.conf index 6826b31ca3679b..57dc76f55bd5d8 100644 --- a/examples/pump-controller-app/nrfconnect/prj_release.conf +++ b/examples/pump-controller-app/nrfconnect/prj_release.conf @@ -26,6 +26,13 @@ CONFIG_CHIP_DEVICE_PRODUCT_ID=32785 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/pump-controller-app/nrfconnect/sysbuild.conf b/examples/pump-controller-app/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..d0c5eee2b93c39 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/prj.conf b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/prj.conf new file mode 100644 index 00000000000000..3bcb12fe7b8d25 --- /dev/null +++ b/examples/pump-controller-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -0,0 +1,49 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/examples/window-app/nrfconnect/CMakeLists.txt b/examples/window-app/nrfconnect/CMakeLists.txt index 21eee307f1f388..e6f7ebca632047 100644 --- a/examples/window-app/nrfconnect/CMakeLists.txt +++ b/examples/window-app/nrfconnect/CMakeLists.txt @@ -23,14 +23,6 @@ get_filename_component(WIN_APP_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../common/ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) -# Set Kconfig root files that will be processed as a first Kconfig for used child images. -set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root) -set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root) - -if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf") - set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml) -endif() - list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module) find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) @@ -42,6 +34,7 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-window-app-example) +include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/window-app/nrfconnect/Kconfig.sysbuild b/examples/window-app/nrfconnect/Kconfig.sysbuild new file mode 100644 index 00000000000000..8877de44e2d570 --- /dev/null +++ b/examples/window-app/nrfconnect/Kconfig.sysbuild @@ -0,0 +1,76 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X + +# Enable Bluetooth serialization to network core +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay b/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf52840dk_nrf52840_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index f18e3e0cc16434..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay b/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay deleted file mode 100644 index 0728eff3db8377..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp_release.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/prj.conf b/examples/window-app/nrfconnect/child_image/mcuboot/prj.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/prj.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/window-app/nrfconnect/child_image/mcuboot/prj_release.conf b/examples/window-app/nrfconnect/child_image/mcuboot/prj_release.conf deleted file mode 100644 index 287c7829c6a5cf..00000000000000 --- a/examples/window-app/nrfconnect/child_image/mcuboot/prj_release.conf +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.mcuboot.defaults to set options common for all -# samples using mcuboot. This file should contain only options specific for this sample -# mcuboot configuration or overrides of default values. - -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" - -# Bootloader size optimization -# Disable not used modules that cannot be set in Kconfig.mcuboot.defaults due to overriding -# in board files. -CONFIG_GPIO=n -CONFIG_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=n diff --git a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf b/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf b/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_no_dfu.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf b/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf deleted file mode 100644 index f43614c64500d7..00000000000000 --- a/examples/window-app/nrfconnect/child_image/multiprotocol_rpmsg/prj_release.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This target uses Kconfig.multiprotocol_rpmsg.defaults to set options common for all -# samples using multiprotocol_rpmsg. This file should contain only options specific for this sample -# multiprotocol_rpmsg configuration or overrides of default values. - -# Disable not used modules that cannot be set in Kconfig.multiprotocol_rpmsg.defaults due to overriding -# in board files. - -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n diff --git a/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml b/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml b/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml new file mode 100644 index 00000000000000..ce42b39e55ee87 --- /dev/null +++ b/examples/window-app/nrfconnect/pm_static_nrf52840dk_nrf52840_release.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xf3e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf4000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xf3e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf4000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf4000 + size: 0x70c000 + device: MX25R64 + region: external_flash diff --git a/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml b/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml new file mode 100644 index 00000000000000..10e8680c363a53 --- /dev/null +++ b/examples/window-app/nrfconnect/pm_static_nrf5340dk_nrf5340_cpuapp_release.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xf2e00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xf3000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xf2e00 +factory_data: + address: 0xfb000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xfc000 + size: 0x4000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xf3000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xf3000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x133000 + size: 0x6CD000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/examples/window-app/nrfconnect/prj.conf b/examples/window-app/nrfconnect/prj.conf index 392e84ee268a54..64d257fe211082 100644 --- a/examples/window-app/nrfconnect/prj.conf +++ b/examples/window-app/nrfconnect/prj.conf @@ -21,6 +21,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y diff --git a/examples/window-app/nrfconnect/prj_no_dfu.conf b/examples/window-app/nrfconnect/prj_no_dfu.conf deleted file mode 100644 index 570011cc9ef6da..00000000000000 --- a/examples/window-app/nrfconnect/prj_no_dfu.conf +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample uses Kconfig.defaults to set options common for all -# samples. This file should contain only options specific for this sample -# or overrides of default values. - -# Enable CHIP -CONFIG_CHIP=y -CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" -# 32784 == 0x8010 (example window-app) -CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 -CONFIG_STD_CPP17=y - -# Add support for LEDs and buttons on Nordic development kits -CONFIG_DK_LIBRARY=y -CONFIG_PWM=y - -# PWM support -CONFIG_PWM=y - -# OpenThread configs -CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y -CONFIG_OPENTHREAD_MTD=y -CONFIG_OPENTHREAD_FTD=n -CONFIG_CHIP_ENABLE_ICD_SUPPORT=y -CONFIG_CHIP_THREAD_SSED=y -CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL=500 -CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL=500 - -# Bluetooth Low Energy configuration -CONFIG_BT_DEVICE_NAME="MatterWinCov" - -# Stack size settings -CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024 - -# Other settings -CONFIG_THREAD_NAME=y -CONFIG_MPU_STACK_GUARD=y -CONFIG_RESET_ON_FATAL_ERROR=n - -# Reduce application size -CONFIG_USE_SEGGER_RTT=n - -# Disable Matter OTA DFU -CONFIG_CHIP_OTA_REQUESTOR=n - -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n diff --git a/examples/window-app/nrfconnect/prj_release.conf b/examples/window-app/nrfconnect/prj_release.conf index e7859efaa81de6..b15a68ea3caa8b 100644 --- a/examples/window-app/nrfconnect/prj_release.conf +++ b/examples/window-app/nrfconnect/prj_release.conf @@ -25,6 +25,13 @@ CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" CONFIG_CHIP_DEVICE_PRODUCT_ID=32784 CONFIG_STD_CPP17=y +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + # Add support for LEDs and buttons on Nordic development kits CONFIG_DK_LIBRARY=y CONFIG_PWM=y diff --git a/examples/window-app/nrfconnect/sysbuild.conf b/examples/window-app/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..d0c5eee2b93c39 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y diff --git a/examples/window-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/examples/window-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 00000000000000..8540585e53358b --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,58 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# 802.15.4 configuration +CONFIG_NRF_802154_SER_RADIO=y +CONFIG_NRF_802154_ENCRYPTION=y +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_EXCEPTION_STACK_TRACE=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y +CONFIG_IPC_RADIO_802154=y diff --git a/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj.conf b/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj.conf new file mode 100644 index 00000000000000..8906415dda4fc7 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf b/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 00000000000000..7f92a51630cce0 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,20 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/app.overlay b/examples/window-app/nrfconnect/sysbuild/mcuboot/app.overlay new file mode 100644 index 00000000000000..74d3dfbfd22f30 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 00000000000000..50610217c762b5 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000000..2d86fe6442dd39 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,35 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 + +# The following configurations are required to support simultaneous multi image update +CONFIG_PCD_APP=y +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 + +CONFIG_BOOT_SWAP_USING_MOVE=n +# Multi-image updates do not support image swapping yet. +CONFIG_BOOT_UPGRADE_ONLY=y + +# The network core cannot access external flash directly. The flash simulator must be used to +# provide a memory region that is used to forward the new firmware to the network core. +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_ZCBOR=y diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000000..054f04712058a3 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/examples/window-app/nrfconnect/sysbuild/mcuboot/prj.conf b/examples/window-app/nrfconnect/sysbuild/mcuboot/prj.conf new file mode 100644 index 00000000000000..3bcb12fe7b8d25 --- /dev/null +++ b/examples/window-app/nrfconnect/sysbuild/mcuboot/prj.conf @@ -0,0 +1,49 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 2795c6b5095cd5..e9ce65dfd45723 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -23,7 +23,7 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 4c02dc8718c590..07a24892ba1863 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:54" + - name: "ghcr.io/project-chip/chip-build-vscode:65" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index d584490589c662..567033e5fec200 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -184,10 +184,6 @@ def generate(self): if self.enable_rpcs: flags.append("-DOVERLAY_CONFIG=rpc.overlay") - if (self.board == NrfBoard.NRF52840DONGLE and - self.app != NrfApp.ALL_CLUSTERS and self.app != NrfApp.ALL_CLUSTERS_MINIMAL): - flags.append("-DCONF_FILE=prj_no_dfu.conf") - if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") @@ -201,7 +197,7 @@ def generate(self): export ZEPHYR_SDK_INSTALL_DIR={zephyr_sdk_dir};''' cmd += ''' -west build --cmake-only -d {outdir} -b {board} {sourcedir}{build_flags} +west build --cmake-only -d {outdir} -b {board} --sysbuild {sourcedir}{build_flags} '''.format( outdir=shlex.quote(self.output_dir), board=self.board.GnArgName(), diff --git a/scripts/build/testdata/dry_run_nrf-nrf52840dk-pump.txt b/scripts/build/testdata/dry_run_nrf-nrf52840dk-pump.txt index 500826f734eee9..91865370312d97 100644 --- a/scripts/build/testdata/dry_run_nrf-nrf52840dk-pump.txt +++ b/scripts/build/testdata/dry_run_nrf-nrf52840dk-pump.txt @@ -4,7 +4,7 @@ cd "{root}" # Generating nrf-nrf52840dk-pump bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh"; export ZEPHYR_TOOLCHAIN_VARIANT=zephyr; -west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 {root}/examples/pump-app/nrfconnect' +west build --cmake-only -d {out}/nrf-nrf52840dk-pump -b nrf52840dk_nrf52840 --sysbuild {root}/examples/pump-app/nrfconnect' # Building nrf-nrf52840dk-pump ninja -C {out}/nrf-nrf52840dk-pump diff --git a/scripts/examples/nrfconnect_example.sh b/scripts/examples/nrfconnect_example.sh index 0a7c46d7e9baef..67223afb2a092e 100755 --- a/scripts/examples/nrfconnect_example.sh +++ b/scripts/examples/nrfconnect_example.sh @@ -51,4 +51,4 @@ fi export CCACHE_BASEDIR="$PWD/$APP/nrfconnect" env -west build -p auto -b "$BOARD" -d "$APP/nrfconnect/build" "$APP/nrfconnect" -- "${COMMON_CI_FLAGS[@]}" "$@" +west build -p auto -b "$BOARD" -d "$APP/nrfconnect/build" "$APP/nrfconnect" --sysbuild -- "${COMMON_CI_FLAGS[@]}" "$@" diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index bf0611f4f9eb7c..a5af1b462fb335 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -261,7 +261,7 @@ types-protobuf==4.24.0.2 # via # -r requirements.all.txt # mypy-protobuf -typing-extensions==4.5.0 +typing-extensions==4.6.0 # via mypy urllib3==1.26.14 # via requests diff --git a/scripts/setup/requirements.nrfconnect.txt b/scripts/setup/requirements.nrfconnect.txt index e2ada120811850..6785f2114a10e7 100644 --- a/scripts/setup/requirements.nrfconnect.txt +++ b/scripts/setup/requirements.nrfconnect.txt @@ -5,3 +5,4 @@ cbor2>=5.4.3 ecdsa>=0.18.0 qrcode==7.4.2 python_stdnum==1.18 +typing-extensions>=4.6.0 diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 991c3689425ae7..d0d31252f99368 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -74,6 +74,11 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 #endif +// nrfconnect platform does not support ethernet yet, but we need this config defined as we share the Zephyr platform +#ifndef CHIP_DEVICE_CONFIG_ENABLE_ETHERNET +#define CHIP_DEVICE_CONFIG_ENABLE_ETHERNET 0 +#endif // CHIP_DEVICE_CONFIG_ENABLE_ETHERNET + #ifdef CONFIG_BT #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_BT #else diff --git a/src/platform/nrfconnect/CHIPPlatformConfig.h b/src/platform/nrfconnect/CHIPPlatformConfig.h index ee4609e05c5e5c..096bc3426c5fe3 100644 --- a/src/platform/nrfconnect/CHIPPlatformConfig.h +++ b/src/platform/nrfconnect/CHIPPlatformConfig.h @@ -141,3 +141,9 @@ #define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC #endif // CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC #endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#ifndef CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER +#ifdef CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER +#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER +#endif // CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER +#endif // CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER diff --git a/src/platform/nrfconnect/ConnectivityManagerImpl.cpp b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp index ecd185200c78f7..971c365561b2bc 100644 --- a/src/platform/nrfconnect/ConnectivityManagerImpl.cpp +++ b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp @@ -24,6 +24,10 @@ #include #include +#ifndef CONFIG_ARCH_POSIX +#include +#endif + #include #if INET_CONFIG_ENABLE_TCP_ENDPOINT diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index fb544466dcdd75..de2f59cb7eac27 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -66,3 +66,6 @@ struct ChipDeviceEvent; #endif // CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX // ========== Platform-specific Configuration Overrides ========= + +// Disable Zephyr Socket extensions module, as the Zephyr RTOS now implements recvmsg() +#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS 0 diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index 11784f4475cfe0..6b1effd541be15 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -49,6 +49,21 @@ namespace DeviceLayer { namespace { +app::Clusters::NetworkCommissioning::WiFiBandEnum ConvertBandEnum(uint8_t band) +{ + switch (band) + { + case WIFI_FREQ_BAND_2_4_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k2g4; + case WIFI_FREQ_BAND_5_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k5g; + case WIFI_FREQ_BAND_6_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k6g; + default: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::kUnknownEnumValue; + } +} + NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * result) { NetworkCommissioning::WiFiScanResponse response = {}; @@ -61,9 +76,10 @@ NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * r // TODO: Distinguish WPA versions response.security.Set(result->security == WIFI_SECURITY_TYPE_PSK ? NetworkCommissioning::WiFiSecurity::kWpaPersonal : NetworkCommissioning::WiFiSecurity::kUnencrypted); - response.channel = result->channel; - response.rssi = result->rssi; - response.ssidLen = result->ssid_length; + response.channel = result->channel; + response.rssi = result->rssi; + response.ssidLen = result->ssid_length; + response.wiFiBand = ConvertBandEnum(result->band); memcpy(response.ssid, result->ssid, result->ssid_length); // TODO: MAC/BSSID is not filled by the Wi-Fi driver memcpy(response.bssid, result->mac, result->mac_length); @@ -300,8 +316,8 @@ CHIP_ERROR WiFiManager::GetNetworkStatistics(NetworkStatistics & stats) const stats.mPacketMulticastRxCount = data.multicast.rx; stats.mPacketMulticastTxCount = data.multicast.tx; - stats.mPacketUnicastRxCount = data.pkts.rx - data.multicast.rx - data.broadcast.rx; - stats.mPacketUnicastTxCount = data.pkts.tx - data.multicast.tx - data.broadcast.tx; + stats.mPacketUnicastRxCount = data.unicast.rx; + stats.mPacketUnicastTxCount = data.unicast.tx; stats.mBeaconsSuccessCount = data.sta_mgmt.beacons_rx; stats.mBeaconsLostCount = data.sta_mgmt.beacons_miss; diff --git a/src/test_driver/nrfconnect/sysbuild.conf b/src/test_driver/nrfconnect/sysbuild.conf new file mode 100644 index 00000000000000..d0c5eee2b93c39 --- /dev/null +++ b/src/test_driver/nrfconnect/sysbuild.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SB_CONFIG_MATTER=y