Skip to content

Commit c72fdcc

Browse files
maje-embnordicjm
authored andcommitted
applications: nrf_desktop: Migrate mcuboot_smp layout to DTS
Migrate the mcuboot smp flash layout used by the mcuboot_smp from the Partition Manager to DTS on the following boards: * nrf52840dk/nrf52840 * nrf52840gmouse/nrf52840 Ref: NCSDK-38503 Signed-off-by: Marcin Jelinski <marcin.jelinski@nordicsemi.no>
1 parent 0cb7cc7 commit c72fdcc

8 files changed

Lines changed: 119 additions & 2 deletions

File tree

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/app_mcuboot_smp.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7+
#include "memory_map_mcuboot_smp.dtsi"
78
#include "app_common.dtsi"
89

910
/ {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../memory_map_mcuboot_smp.dtsi"
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &boot_partition;
12+
};
13+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&flash0 {
8+
/delete-node/ partitions;
9+
10+
partitions {
11+
#address-cells = <1>;
12+
#size-cells = <1>;
13+
ranges;
14+
15+
boot_partition: partition@0 {
16+
compatible = "zephyr,mapped-partition";
17+
label = "mcuboot";
18+
reg = <0x0 DT_SIZE_K(48)>;
19+
};
20+
21+
slot0_partition: partition@c000 {
22+
compatible = "zephyr,mapped-partition";
23+
label = "image-0";
24+
reg = <0xc000 DT_SIZE_K(484)>;
25+
};
26+
27+
slot1_partition: partition@85000 {
28+
compatible = "zephyr,mapped-partition";
29+
label = "image-1";
30+
reg = <0x85000 DT_SIZE_K(484)>;
31+
};
32+
33+
storage_partition: partition@fe000 {
34+
compatible = "zephyr,mapped-partition";
35+
label = "storage";
36+
reg = <0xfe000 DT_SIZE_K(8)>;
37+
};
38+
};
39+
};
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2026 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
@@ -8,3 +8,5 @@
88
SB_CONFIG_BOOTLOADER_MCUBOOT=y
99
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
1010
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private.pem"
11+
12+
SB_CONFIG_PARTITION_MANAGER=n
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "memory_map_mcuboot_smp.dtsi"
8+
#include "app_common.dtsi"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../memory_map_mcuboot_smp.dtsi"
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &boot_partition;
12+
};
13+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&flash0 {
8+
/delete-node/ partitions;
9+
10+
partitions {
11+
#address-cells = <1>;
12+
#size-cells = <1>;
13+
ranges;
14+
15+
boot_partition: partition@0 {
16+
compatible = "zephyr,mapped-partition";
17+
label = "mcuboot";
18+
reg = <0x0 DT_SIZE_K(24)>;
19+
};
20+
21+
slot0_partition: partition@6000 {
22+
compatible = "zephyr,mapped-partition";
23+
label = "image-0";
24+
reg = <0x6000 DT_SIZE_K(496)>;
25+
};
26+
27+
slot1_partition: partition@82000 {
28+
compatible = "zephyr,mapped-partition";
29+
label = "image-1";
30+
reg = <0x82000 DT_SIZE_K(496)>;
31+
};
32+
33+
storage_partition: partition@fe000 {
34+
compatible = "zephyr,mapped-partition";
35+
label = "storage";
36+
reg = <0xfe000 DT_SIZE_K(8)>;
37+
};
38+
};
39+
};
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2026 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
@@ -8,3 +8,5 @@
88
SB_CONFIG_BOOTLOADER_MCUBOOT=y
99
SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
1010
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private.pem"
11+
12+
SB_CONFIG_PARTITION_MANAGER=n

0 commit comments

Comments
 (0)