-
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] Added support for multi-image Device Firmware Upgrade (#…
…10105) Currently lock-app and lighting-app examples support performinf Device Firmware Upgrade over Bluetooth LE on nRF52840 DK and nRF5340 DK devices. However they do support only upgrading application firmware, while nRF5340 has also second core running network firmware. * Added additional config files allowing to support multi-image Device Firmware Upgrade on nRF5340DK. * Moved mcuboot.conf files from child_image to configuration, as they are no longer attached automatically by the nrfconnect toolchain. * Aligned READMEs and DFU guide.
- Loading branch information
1 parent
837f100
commit 2271384
Showing
25 changed files
with
744 additions
and
71 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
config/nrfconnect/app/overlay-multi_image_dfu_support.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,53 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
CONFIG_BOOTLOADER_MCUBOOT=y | ||
CONFIG_UPDATEABLE_IMAGE_NUMBER=2 | ||
|
||
# QSPI configuration | ||
CONFIG_NORDIC_QSPI_NOR=y | ||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 | ||
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 | ||
|
||
# External flash memory configuration | ||
CONFIG_PM_EXTERNAL_FLASH_SUPPORT_LEGACY=y | ||
CONFIG_PM_EXTERNAL_FLASH=y | ||
CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="MX25R64" | ||
CONFIG_PM_EXTERNAL_FLASH_SIZE=0x800000 | ||
CONFIG_PM_EXTERNAL_FLASH_BASE=0 | ||
|
||
# MCU Manager and SMP configuration | ||
CONFIG_MCUMGR=y | ||
CONFIG_MCUMGR_CMD_IMG_MGMT=y | ||
CONFIG_MCUMGR_CMD_OS_MGMT=y | ||
CONFIG_MCUMGR_SMP_BT=y | ||
CONFIG_MCUMGR_SMP_BT_AUTHEN=n | ||
CONFIG_MCUMGR_BUF_COUNT=6 | ||
|
||
# Increase BT MTU and RX buffer for big size DFU messages | ||
CONFIG_BT_L2CAP_TX_MTU=260 | ||
CONFIG_BT_BUF_ACL_RX_SIZE=264 | ||
|
||
# Increase system workqueue size, as SMP is processed within it | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2800 | ||
|
||
# FLASH nop device is enabled to prevent bus faults when mcumgr tries to access | ||
# simulated partition with network core image data. | ||
CONFIG_FLASH_NOP_DEVICE=y | ||
|
||
# Enable custom SMP request to erase settings partition. | ||
CONFIG_MCUMGR_GRP_ZEPHYR_BASIC=y | ||
CONFIG_MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE=y |
File renamed without changes.
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
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
44 changes: 44 additions & 0 deletions
44
examples/lighting-app/nrfconnect/configuration/mcuboot_multi_image_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,44 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
# QSPI configuration | ||
CONFIG_NORDIC_QSPI_NOR=y | ||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 | ||
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 | ||
|
||
CONFIG_MULTITHREADING=y | ||
CONFIG_BOOT_MAX_IMG_SECTORS=256 | ||
|
||
# External flash memory configuration | ||
CONFIG_PM_EXTERNAL_FLASH_SUPPORT_LEGACY=y | ||
CONFIG_PM_EXTERNAL_FLASH=y | ||
CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="MX25R64" | ||
CONFIG_PM_EXTERNAL_FLASH_SIZE=0x800000 | ||
CONFIG_PM_EXTERNAL_FLASH_BASE=0 | ||
|
||
# The following configurations are required to support simultaneous multi image update | ||
CONFIG_PCD_APP=y | ||
CONFIG_UPDATEABLE_IMAGE_NUMBER=2 | ||
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 | ||
|
||
# Enable custom command to erase settings partition. | ||
CONFIG_ENABLE_MGMT_PERUSER=y | ||
CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE=y |
File renamed without changes.
36 changes: 25 additions & 11 deletions
36
examples/lighting-app/nrfconnect/configuration/nrf5340dk_nrf5340_cpuapp/pm_static.yml
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 |
---|---|---|
@@ -1,38 +1,52 @@ | ||
mcuboot: | ||
address: 0x0 | ||
size: 0xc000 | ||
size: 0x10000 | ||
region: flash_primary | ||
mcuboot_pad: | ||
address: 0xc000 | ||
address: 0x10000 | ||
size: 0x200 | ||
app: | ||
address: 0xc200 | ||
size: 0xebe00 | ||
address: 0x10200 | ||
size: 0xe7e00 | ||
mcuboot_primary: | ||
orig_span: &id001 | ||
- mcuboot_pad | ||
- app | ||
span: *id001 | ||
address: 0xc000 | ||
size: 0xec000 | ||
address: 0x10000 | ||
size: 0xe8000 | ||
region: flash_primary | ||
mcuboot_primary_app: | ||
orig_span: &id002 | ||
- app | ||
span: *id002 | ||
address: 0xc200 | ||
size: 0xebe00 | ||
address: 0x10200 | ||
size: 0xe7e00 | ||
settings_storage: | ||
address: 0xf8000 | ||
size: 0x8000 | ||
region: flash_primary | ||
mcuboot_primary_1: | ||
address: 0x0 | ||
size: 0x40000 | ||
device: flash_ctrl | ||
region: ram_flash | ||
mcuboot_secondary: | ||
address: 0x0 | ||
size: 0xec000 | ||
size: 0xe8000 | ||
device: MX25R64 | ||
region: external_flash | ||
mcuboot_secondary_1: | ||
address: 0xe8000 | ||
size: 0x40000 | ||
device: MX25R64 | ||
region: external_flash | ||
external_flash: | ||
address: 0xec000 | ||
size: 0x714000 | ||
address: 0x128000 | ||
size: 0x6d8000 | ||
device: MX25R64 | ||
region: external_flash | ||
pcd_sram: | ||
address: 0x20000000 | ||
size: 0x2000 | ||
region: sram_primary |
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
Oops, something went wrong.