Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions l9/l9_e6/boards/nrf52833dk_nrf52833.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* nRF52833DK flash re-partition (Partition Manager disabled, DTS authoritative).
*
* Change vs. the board default: mcuboot (boot_partition) is 8 KB smaller and the
* application slot (slot0_partition / image-0) is 8 KB bigger. slot0's end address
* is unchanged, so slot1 and storage keep their original addresses.
*
* MCUboot swap-based DFU requires slot0 and slot1 to be equal, so slot1 also grows
* to 228 KB; the extra 8 KB is reclaimed from storage (24 KB -> 16 KB).
*
* boot_partition 0x00000 40 KB (was 48 KB)
* slot0_partition 0x0a000 228 KB (was 220 KB)
* slot1_partition 0x43000 228 KB (was 220 KB)
* storage_partition 0x7c000 16 KB (was 24 KB)
*/

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(40)>;
};

slot0_partition: partition@a000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xa000 DT_SIZE_K(228)>;
};

slot1_partition: partition@43000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x43000 DT_SIZE_K(228)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(16)>;
};
};
};
32 changes: 32 additions & 0 deletions l9/l9_e6/boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(56)>;
};

slot0_partition: partition@e000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xe000 DT_SIZE_K(220)>;
};

slot1_partition: partition@45000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x45000 DT_SIZE_K(220)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(12)>;
};
};
};
14 changes: 0 additions & 14 deletions l9/l9_e6/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Step 2.1 Enable MCUboot
SB_CONFIG_BOOTLOADER_MCUBOOT=y

# Step 6.3 - Configure project to use external flash for DFU

# Step 7.2 - Add b0n image

# Step 7.3 - Set up multiple partitions

# Step 7.4 - Add support to netcore for DFU

# Step 7.5 - Add support to mcuboot for updating
# two cores simultaneously

# Step 7.6 - Simultaneous FOTA does not support rollback


5 changes: 5 additions & 0 deletions l9/l9_e6/sysbuild/mcuboot/app.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
19 changes: 19 additions & 0 deletions l9/l9_e6/sysbuild/mcuboot/boards/nrf52833dk_nrf52833.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* MCUboot image copy of the nRF52833DK re-partition (Partition Manager disabled).
*
* MCUboot is a separate sysbuild image and reads the flash layout from its own
* devicetree, so it must see the SAME partitions as the application. This file is
* picked up as mcuboot_DTC_OVERLAY_FILE via the sysbuild "<image>.overlay" naming.
*
* In addition to the partition table it selects boot_partition as the code
* partition, because MCUboot itself runs from the boot slot.
*/

#include "../../../boards/nrf52833dk_nrf52833.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(56)>;
};

slot0_partition: partition@e000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xe000 DT_SIZE_K(220)>;
};

slot1_partition: partition@45000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x45000 DT_SIZE_K(220)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(12)>;
};
};
};

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
24 changes: 24 additions & 0 deletions l9/l9_e6/sysbuild/mcuboot/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CONFIG_FPROTECT=n
# MCUboot requires a large stack size, otherwise an MPU fault will occur
CONFIG_MAIN_STACK_SIZE=16384

# Enable flash operations
CONFIG_FLASH=y

CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=y
CONFIG_MULTITHREADING=y

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_LOG_DEFAULT_LEVEL=0
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
# Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y
# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y

CONFIG_FW_INFO_FIRMWARE_VERSION=2

# NCS boot banner
CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="MCUboot"
CONFIG_LOG=n
48 changes: 48 additions & 0 deletions l9/l9_e6_sol/boards/nrf52833dk_nrf52833.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* nRF52833DK flash re-partition (Partition Manager disabled, DTS authoritative).
*
* Change vs. the board default: mcuboot (boot_partition) is 8 KB smaller and the
* application slot (slot0_partition / image-0) is 8 KB bigger. slot0's end address
* is unchanged, so slot1 and storage keep their original addresses.
*
* MCUboot swap-based DFU requires slot0 and slot1 to be equal, so slot1 also grows
* to 228 KB; the extra 8 KB is reclaimed from storage (24 KB -> 16 KB).
*
* boot_partition 0x00000 40 KB (was 48 KB)
* slot0_partition 0x0a000 228 KB (was 220 KB)
* slot1_partition 0x43000 228 KB (was 220 KB)
* storage_partition 0x7c000 16 KB (was 24 KB)
*/

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(40)>;
};

slot0_partition: partition@a000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xa000 DT_SIZE_K(228)>;
};

slot1_partition: partition@43000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x43000 DT_SIZE_K(228)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(16)>;
};
};
};
48 changes: 48 additions & 0 deletions l9/l9_e6_sol/boards/nrf52dk_nrf52832.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* nRF52833DK flash re-partition (Partition Manager disabled, DTS authoritative).
*
* Change vs. the board default: mcuboot (boot_partition) is 8 KB smaller and the
* application slot (slot0_partition / image-0) is 8 KB bigger. slot0's end address
* is unchanged, so slot1 and storage keep their original addresses.
*
* MCUboot swap-based DFU requires slot0 and slot1 to be equal, so slot1 also grows
* to 228 KB; the extra 8 KB is reclaimed from storage (24 KB -> 16 KB).
*
* boot_partition 0x00000 40 KB (was 48 KB)
* slot0_partition 0x0a000 228 KB (was 220 KB)
* slot1_partition 0x43000 228 KB (was 220 KB)
* storage_partition 0x7c000 16 KB (was 24 KB)
*/

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(40)>;
};

slot0_partition: partition@a000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xa000 DT_SIZE_K(228)>;
};

slot1_partition: partition@43000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x43000 DT_SIZE_K(228)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(16)>;
};
};
};
4 changes: 4 additions & 0 deletions l9/l9_e6_sol/boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_CBPRINTF_NANO=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_ASSERT=n
CONFIG_BOOT_BANNER=n
32 changes: 32 additions & 0 deletions l9/l9_e6_sol/boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
partitions {
boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x0 DT_SIZE_K(56)>;
};

slot0_partition: partition@e000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0xe000 DT_SIZE_K(220)>;
};

slot1_partition: partition@45000 {
compatible = "zephyr,mapped-partition";
label = "image-1";
reg = <0x45000 DT_SIZE_K(220)>;
};

storage_partition: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x7c000 DT_SIZE_K(12)>;
};
};
};
15 changes: 0 additions & 15 deletions l9/l9_e6_sol/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
# Step 2.1 Enable MCUboot
SB_CONFIG_BOOTLOADER_MCUBOOT=y

# Step 6.3 - Configure project to use external flash for DFU

# Step 7.2 - Add b0n image

# Step 7.3 - Set up multiple partitions

# Step 7.4 - Add support to netcore for DFU

# Step 7.5 - Add support to mcuboot for updating
# two cores simultaneously

# Step 7.6 - Simultaneous FOTA does not support rollback


5 changes: 5 additions & 0 deletions l9/l9_e6_sol/sysbuild/mcuboot/app.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
19 changes: 19 additions & 0 deletions l9/l9_e6_sol/sysbuild/mcuboot/boards/nrf52833dk_nrf52833.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* MCUboot image copy of the nRF52833DK re-partition (Partition Manager disabled).
*
* MCUboot is a separate sysbuild image and reads the flash layout from its own
* devicetree, so it must see the SAME partitions as the application. This file is
* picked up as mcuboot_DTC_OVERLAY_FILE via the sysbuild "<image>.overlay" naming.
*
* In addition to the partition table it selects boot_partition as the code
* partition, because MCUboot itself runs from the boot slot.
*/

#include "../../../boards/nrf52833dk_nrf52833.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};

19 changes: 19 additions & 0 deletions l9/l9_e6_sol/sysbuild/mcuboot/boards/nrf52dk_nrf52832.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* MCUboot image copy of the nRF52833DK re-partition (Partition Manager disabled).
*
* MCUboot is a separate sysbuild image and reads the flash layout from its own
* devicetree, so it must see the SAME partitions as the application. This file is
* picked up as mcuboot_DTC_OVERLAY_FILE via the sysbuild "<image>.overlay" naming.
*
* In addition to the partition table it selects boot_partition as the code
* partition, because MCUboot itself runs from the boot slot.
*/

#include "../../../boards/nrf52dk_nrf52832.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "../../../boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
Loading
Loading