-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrfconnect] Refactored configuration for child images (#17174)
Currently used approach for nrfconnect regarding child images results in significant duplication of configuration files, what hardens maintenance. * Created Kconfig.mcuboot.defaults file that sets default configuration for all examples using mcuboot child image * Created Kconfig.multiprotocol_rpmsg file that sets default configuration for all examples using multiprotocol rpmsg child image * Flatten configuration structure by removing configuration/board-name/ files and creating common prj.confs in the application root directory * Removed from rpc.overlay comment describing how to use it, as it duplicates example README.md information
- Loading branch information
1 parent
627d855
commit 3685726
Showing
137 changed files
with
1,167 additions
and
2,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# | ||
# 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 | ||
int | ||
default 10240 | ||
|
||
config BOOT_SWAP_SAVE_ENCTLV | ||
bool | ||
default n | ||
|
||
config BOOT_ENCRYPT_RSA | ||
bool | ||
default n | ||
|
||
config BOOT_ENCRYPT_EC256 | ||
bool | ||
default n | ||
|
||
config BOOT_ENCRYPT_X25519 | ||
bool | ||
default n | ||
|
||
choice BOOT_IMAGE_UPGRADE_MODE | ||
default BOOT_UPGRADE_ONLY | ||
endchoice | ||
|
||
config BOOT_BOOTSTRAP | ||
bool | ||
default n | ||
|
||
config PM | ||
bool | ||
default n | ||
|
||
config FLASH | ||
bool | ||
default y | ||
|
||
config FPROTECT | ||
bool | ||
default y | ||
|
||
config NORDIC_QSPI_NOR | ||
bool | ||
default y | ||
|
||
config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE | ||
int | ||
default 4096 | ||
|
||
config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE | ||
int | ||
default 16 | ||
|
||
config BOOT_MAX_IMG_SECTORS | ||
int | ||
default 256 | ||
|
||
config LOG | ||
bool | ||
default n | ||
|
||
config CONSOLE_HANDLER | ||
bool | ||
default n | ||
|
||
config BOOT_BANNER | ||
bool | ||
default n | ||
|
||
config TIMESLICING | ||
bool | ||
default n | ||
|
||
config RESET_ON_FATAL_ERROR | ||
bool | ||
default n | ||
|
||
config MULTITHREADING | ||
bool | ||
default n | ||
|
||
config TICKLESS_KERNEL | ||
bool | ||
default n | ||
|
||
config TIMEOUT_64BIT | ||
bool | ||
default n | ||
|
||
config NRF_ENABLE_ICACHE | ||
bool | ||
default n | ||
|
||
if SOC_SERIES_NRF53X | ||
|
||
# The following configurations are required to support simultaneous multi image update | ||
config PCD_APP | ||
bool | ||
default y | ||
|
||
config UPDATEABLE_IMAGE_NUMBER | ||
int | ||
default 2 | ||
|
||
# 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 | ||
bool | ||
default y | ||
|
||
config FLASH_SIMULATOR_DOUBLE_WRITES | ||
bool | ||
default y | ||
|
||
config FLASH_SIMULATOR_STATS | ||
bool | ||
default n | ||
|
||
# Enable custom command to erase settings partition. | ||
config ENABLE_MGMT_PERUSER | ||
bool | ||
default y | ||
|
||
config BOOT_MGMT_CUSTOM_STORAGE_ERASE | ||
bool | ||
default y | ||
|
||
endif # SOC_SERIES_NRF53X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# | ||
# 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 | ||
bool | ||
default n | ||
|
||
config HEAP_MEM_POOL_SIZE | ||
int | ||
default 8192 | ||
|
||
config MAIN_STACK_SIZE | ||
int | ||
default 2048 | ||
|
||
config SYSTEM_WORKQUEUE_STACK_SIZE | ||
int | ||
default 2048 | ||
|
||
config BT | ||
bool | ||
default y | ||
|
||
config BT_HCI_RAW | ||
bool | ||
default y | ||
|
||
config BT_MAX_CONN | ||
int | ||
default 1 | ||
|
||
config BT_PERIPHERAL | ||
bool | ||
default y | ||
|
||
config BT_CENTRAL | ||
bool | ||
default n | ||
|
||
config BT_BUF_ACL_RX_SIZE | ||
int | ||
default 502 | ||
|
||
config BT_BUF_ACL_TX_SIZE | ||
int | ||
default 251 | ||
|
||
config BT_CTLR_DATA_LENGTH_MAX | ||
int | ||
default 251 | ||
|
||
config BT_CTLR_ASSERT_HANDLER | ||
bool | ||
default y | ||
|
||
config BT_HCI_RAW_RESERVE | ||
int | ||
default 1 | ||
|
||
# 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 | ||
int | ||
default 10 | ||
|
||
config ASSERT | ||
bool | ||
default y | ||
|
||
config DEBUG_INFO | ||
bool | ||
default y | ||
|
||
config EXCEPTION_STACK_TRACE | ||
bool | ||
default y | ||
|
||
config NRF_802154_SER_RADIO | ||
bool | ||
default y | ||
|
||
config NRF_RTC_TIMER_USER_CHAN_COUNT | ||
int | ||
default 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
examples/all-clusters-app/nrfconnect/child_image/mcuboot/prj_dfu.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# 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 |
Oops, something went wrong.