Skip to content

Commit 7f65a46

Browse files
committedNov 28, 2024
Revert "[nrf toup][nrfconnect] Removed defaults for child images"
This reverts commit 0ae05f2. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

File tree

16 files changed

+411
-0
lines changed

16 files changed

+411
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to define new default values of settings used when building hci_ipc child image for Matter samples.
18+
19+
config LOG
20+
default n
21+
22+
config HEAP_MEM_POOL_SIZE
23+
default 8192
24+
25+
config MAIN_STACK_SIZE
26+
default 2048
27+
28+
config SYSTEM_WORKQUEUE_STACK_SIZE
29+
default 2048
30+
31+
config BT
32+
default y
33+
34+
config BT_HCI_RAW
35+
default y
36+
37+
config BT_MAX_CONN
38+
default 1
39+
40+
config BT_PERIPHERAL
41+
default y
42+
43+
config BT_CENTRAL
44+
default n
45+
46+
config BT_BUF_ACL_RX_SIZE
47+
default 502
48+
49+
config BT_BUF_ACL_TX_SIZE
50+
default 251
51+
52+
config BT_CTLR_DATA_LENGTH_MAX
53+
default 251
54+
55+
config BT_CTLR_ASSERT_HANDLER
56+
default y
57+
58+
# Disable 2M PHY due to interoperability issues.
59+
config BT_CTLR_PHY_2M
60+
default n
61+
62+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
63+
# Host number of completed commands does not follow normal flow control.
64+
config BT_BUF_CMD_TX_COUNT
65+
default 10
66+
67+
config ASSERT
68+
default y
69+
70+
config DEBUG_INFO
71+
default y
72+
73+
config EXCEPTION_STACK_TRACE
74+
default y
75+
76+
config IPC_SERVICE
77+
default y
78+
79+
config MBOX
80+
default y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to create a wrapper Kconfig file that will be set as
18+
# hci_ipc_KCONFIG_ROOT and processed before any other Kconfig for hci_ipc child image.
19+
20+
rsource "Kconfig.hci_ipc.defaults"
21+
source "Kconfig.zephyr"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to define new default values of settings used when building mcuboot child image for Matter samples.
18+
19+
config MAIN_STACK_SIZE
20+
default 10240
21+
22+
config BOOT_ENCRYPT_IMAGE
23+
default n
24+
25+
config BOOT_BOOTSTRAP
26+
default n
27+
28+
config PM
29+
default n
30+
31+
config FLASH
32+
default y
33+
34+
config FPROTECT
35+
default y
36+
37+
choice LIBC_IMPLEMENTATION
38+
default MINIMAL_LIBC
39+
endchoice
40+
41+
# nRF7002DK uses SPI NOR external flash
42+
if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP
43+
44+
config SPI
45+
default y
46+
47+
choice SPI_NOR_SFDP
48+
default SPI_NOR_SFDP_DEVICETREE
49+
endchoice
50+
51+
config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE
52+
default 4096
53+
54+
config MULTITHREADING
55+
default y
56+
57+
config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK
58+
default y
59+
60+
endif
61+
62+
# All boards beside nRF7002DK use QSPI NOR external flash
63+
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840
64+
65+
config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
66+
default 4096
67+
68+
config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE
69+
default 16
70+
71+
endif
72+
73+
config BOOT_MAX_IMG_SECTORS
74+
default 256
75+
76+
config LOG
77+
default n
78+
79+
config CONSOLE_HANDLER
80+
default n
81+
82+
config BOOT_BANNER
83+
default n
84+
85+
config NCS_BOOT_BANNER
86+
default n
87+
88+
config MCUBOOT_BOOT_BANNER
89+
default n
90+
91+
config TIMESLICING
92+
default n
93+
94+
config RESET_ON_FATAL_ERROR
95+
default n
96+
97+
config MULTITHREADING
98+
default n
99+
100+
config TICKLESS_KERNEL
101+
default n
102+
103+
config TIMEOUT_64BIT
104+
default n
105+
106+
config NRF_ENABLE_ICACHE
107+
default n
108+
109+
if SOC_SERIES_NRF53X
110+
111+
# The following configurations are required to support simultaneous multi image update
112+
config PCD_APP
113+
default y
114+
115+
config UPDATEABLE_IMAGE_NUMBER
116+
default 2
117+
118+
# Multi-image updates do not support image swapping yet.
119+
choice BOOT_IMAGE_UPGRADE_MODE
120+
default BOOT_UPGRADE_ONLY
121+
endchoice
122+
123+
# The network core cannot access external flash directly. The flash simulator must be used to
124+
# provide a memory region that is used to forward the new firmware to the network core.
125+
config FLASH_SIMULATOR
126+
default y
127+
128+
config FLASH_SIMULATOR_DOUBLE_WRITES
129+
default y
130+
131+
config FLASH_SIMULATOR_STATS
132+
default n
133+
134+
# Enable custom command to erase settings partition.
135+
config ENABLE_MGMT_PERUSER
136+
default y
137+
138+
config ZCBOR
139+
default y
140+
141+
config BOOT_MGMT_CUSTOM_STORAGE_ERASE
142+
default y
143+
144+
endif # SOC_SERIES_NRF53X
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to create a wrapper Kconfig file that will be set as
18+
# mcuboot_KCONFIG_ROOT and processed before any other Kconfig for mcuboot child image.
19+
20+
rsource "Kconfig.mcuboot.defaults"
21+
source "${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr/Kconfig"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to define new default values of settings used when building multiprotocol_rpmsg child image for Matter samples.
18+
19+
config LOG
20+
default n
21+
22+
config HEAP_MEM_POOL_SIZE
23+
default 8192
24+
25+
config MAIN_STACK_SIZE
26+
default 2048
27+
28+
config SYSTEM_WORKQUEUE_STACK_SIZE
29+
default 2048
30+
31+
config BT
32+
default y
33+
34+
config BT_HCI_RAW
35+
default y
36+
37+
config BT_MAX_CONN
38+
default 1
39+
40+
config BT_PERIPHERAL
41+
default y
42+
43+
config BT_CENTRAL
44+
default n
45+
46+
config BT_BUF_ACL_RX_SIZE
47+
default 502
48+
49+
config BT_BUF_ACL_TX_SIZE
50+
default 251
51+
52+
config BT_CTLR_DATA_LENGTH_MAX
53+
default 251
54+
55+
config BT_CTLR_ASSERT_HANDLER
56+
default y
57+
58+
# Disable 2M PHY due to interoperability issues.
59+
config BT_CTLR_PHY_2M
60+
default n
61+
62+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
63+
# Host number of completed commands does not follow normal flow control.
64+
config BT_BUF_CMD_TX_COUNT
65+
default 10
66+
67+
config ASSERT
68+
default y
69+
70+
config DEBUG_INFO
71+
default y
72+
73+
config EXCEPTION_STACK_TRACE
74+
default y
75+
76+
config NRF_802154_SER_RADIO
77+
default y
78+
79+
config NRF_802154_ENCRYPTION
80+
default y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# The purpose of this file is to create a wrapper Kconfig file that will be set as
18+
# multiprotocol_rpmsg_KCONFIG_ROOT and processed before any other Kconfig for multiprotocol_rpmsg child image.
19+
20+
rsource "Kconfig.multiprotocol_rpmsg.defaults"
21+
source "Kconfig.zephyr"

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

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ get_filename_component(ENERGY_MANAGEMENT_COMMON_DIR ${CHIP_ROOT}/examples/energy
2323

2424
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2525

26+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
27+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
28+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
29+
set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)
30+
2631
if(DEFINED CONF_FILE AND NOT CONF_FILE STREQUAL "prj.conf")
2732
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2833
endif()

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

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-cluster
2222

2323
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2424

25+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
26+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
27+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
28+
2529
if(DEFINED CONF_FILE AND NOT CONF_FILE STREQUAL "prj.conf")
2630
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2731
endif()

‎examples/chef/nrfconnect/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ message(STATUS "Product ID " ${CONFIG_CHIP_DEVICE_PRODUCT_ID})
3131
message(STATUS "Product Name " ${CONFIG_CHIP_DEVICE_PRODUCT_NAME})
3232
message(STATUS "SW Version String" ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING})
3333

34+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
35+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
36+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
37+
3438
list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module)
3539

3640
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.conf)

‎examples/light-switch-app/nrfconnect/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2222

2323
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2424

25+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
26+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
27+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
28+
set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)
29+
2530
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2631
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2732
endif()

‎examples/lighting-app/nrfconnect/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2222

2323
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2424

25+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
26+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
27+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
28+
set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)
29+
2530
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf" AND NOT BOARD STREQUAL "nrf52840dongle_nrf52840")
2631
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2732
endif()

‎examples/lit-icd-app/nrfconnect/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2121

2222
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2323

24+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
25+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
26+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
27+
2428
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2529
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2630
endif()

‎examples/lock-app/nrfconnect/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2121

2222
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2323

24+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
25+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
26+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
27+
set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)
28+
2429
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2530
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2631
endif()

‎examples/pump-app/nrfconnect/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2121

2222
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2323

24+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
25+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
26+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
27+
2428
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2529
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2630
endif()

‎examples/pump-controller-app/nrfconnect/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
2121

2222
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2323

24+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
25+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
26+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
27+
2428
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2529
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2630
endif()

‎examples/window-app/nrfconnect/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ get_filename_component(WIN_APP_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../common/
2323

2424
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2525

26+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
27+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
28+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
29+
2630
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
2731
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
2832
endif()

0 commit comments

Comments
 (0)
Please sign in to comment.