-
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 DFU in light and lock examples. (#6575)
* Added overlay enabling: * MCUboot bootloader * Use of external flash * SMP transactions over BLE that allows performing DFU * MCUboot and flash partitions configuration files for nRF52840DK * Extended documentation by desrciption how to perform DFU
- Loading branch information
1 parent
17ebe03
commit 8221580
Showing
11 changed files
with
488 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# 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 | ||
|
||
# QSPI configuration | ||
CONFIG_NORDIC_QSPI_NOR=y | ||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 | ||
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=4 | ||
|
||
# External flash memory configuration | ||
CONFIG_PM_EXTERNAL_FLASH=y | ||
CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="MX25R64" | ||
CONFIG_PM_EXTERNAL_FLASH_SIZE=0xf2000 | ||
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 | ||
|
||
# Increase BT MTU and RX buffer for big size DFU messages | ||
CONFIG_BT_L2CAP_TX_MTU=252 | ||
CONFIG_BT_L2CAP_RX_MTU=252 | ||
CONFIG_BT_RX_BUF_LEN=260 |
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,29 @@ | ||
# | ||
# 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=4 | ||
|
||
CONFIG_MULTITHREADING=y | ||
CONFIG_BOOT_MAX_IMG_SECTORS=256 | ||
|
||
# External flash memory configuration | ||
CONFIG_PM_EXTERNAL_FLASH=y | ||
CONFIG_PM_EXTERNAL_FLASH_DEV_NAME="MX25R64" | ||
CONFIG_PM_EXTERNAL_FLASH_SIZE=0xf2000 | ||
CONFIG_PM_EXTERNAL_FLASH_BASE=0 |
38 changes: 38 additions & 0 deletions
38
examples/lighting-app/nrfconnect/configuration/nrf52840dk_nrf52840/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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
mcuboot: | ||
address: 0x0 | ||
size: 0xc000 | ||
region: flash_primary | ||
mcuboot_pad: | ||
address: 0xc000 | ||
size: 0x200 | ||
app: | ||
address: 0xc200 | ||
size: 0xf1e00 | ||
mcuboot_primary: | ||
orig_span: &id001 | ||
- mcuboot_pad | ||
- app | ||
span: *id001 | ||
address: 0xc000 | ||
size: 0xf2000 | ||
region: flash_primary | ||
mcuboot_primary_app: | ||
orig_span: &id002 | ||
- app | ||
span: *id002 | ||
address: 0xc200 | ||
size: 0xf1e00 | ||
settings_storage: | ||
address: 0xfe000 | ||
size: 0x2000 | ||
region: flash_primary | ||
mcuboot_secondary: | ||
address: 0x0 | ||
size: 0xf2000 | ||
device: MX25R64 | ||
region: external_flash | ||
external_flash: | ||
address: 0xf2000 | ||
size: 0x0 | ||
device: MX25R64 | ||
region: external_flash |
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
Oops, something went wrong.