Skip to content

Commit 41f21a9

Browse files
maciejbaczmanskide-nordic
authored andcommitted
samples: matter: bootloader size optimizations
Add LTO and size optimization configs for mcuboot and remove redundant configs. Set mcuboot size to `0xD000` for nRF54Lxx Remove PDK overlays. Signed-off-by: Maciej Baczmanski <[email protected]>
1 parent ebfa915 commit 41f21a9

34 files changed

+250
-564
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,13 @@ Matter samples
351351
* Updated all Matter samples that support low-power mode to enable the :ref:`lib_ram_pwrdn` feature.
352352
It is enabled by default for the release configuration of the :ref:`matter_lock_sample`, :ref:`matter_light_switch_sample`, :ref:`matter_smoke_co_alarm_sample`, and :ref:`matter_window_covering_sample` samples.
353353

354+
* Updated:
355+
356+
* All Matter samples that support low-power mode to enable the :ref:`lib_ram_pwrdn` feature.
357+
It is enabled by default for the release configuration of the :ref:`matter_lock_sample`, :ref:`matter_light_switch_sample`, :ref:`matter_smoke_co_alarm_sample`, and :ref:`matter_window_covering_sample` samples.
358+
359+
* The ``pm_static`` configuration for the :ref:`zephyr:nrf54l15dk_nrf54l15` board target, increasing MCUboot size to enable the ED25519 signature type.
360+
354361
* :ref:`matter_template_sample` sample:
355362

356363
* Updated the internal configuration for the :ref:`zephyr:nrf54l15dk_nrf54l15` target to use the DFU image compression and provide more memory space for the application.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
mcuboot:
22
address: 0x0
33
region: flash_primary
4-
size: 0xc000
4+
size: 0xD000
55
mcuboot_pad:
6-
address: 0xc000
6+
address: 0xD000
77
region: flash_primary
88
size: 0x800
99
app:
10-
address: 0xc800
10+
address: 0xD800
1111
region: flash_primary
12-
size: 0x165800
12+
size: 0x164800
1313
mcuboot_primary:
1414
orig_span: &id001
1515
- mcuboot_pad
1616
- app
1717
span: *id001
18-
address: 0xc000
18+
address: 0xD000
1919
region: flash_primary
20-
size: 0x166000
20+
size: 0x165000
2121
mcuboot_primary_app:
2222
orig_span: &id002
2323
- app
2424
span: *id002
25-
address: 0xc800
25+
address: 0xD800
2626
region: flash_primary
27-
size: 0x165800
27+
size: 0x164800
2828
factory_data:
2929
address: 0x172000
3030
region: flash_primary
3131
size: 0x1000
3232
settings_storage:
3333
address: 0x173000
3434
region: flash_primary
35-
size: 0xa000
35+
size: 0xA000
3636
mcuboot_secondary:
3737
address: 0x0
3838
orig_span: &id003
3939
- mcuboot_secondary_pad
4040
- mcuboot_secondary_app
4141
region: external_flash
42-
size: 0x166000
42+
size: 0x165000
4343
span: *id003
4444
mcuboot_secondary_pad:
4545
region: external_flash
@@ -48,9 +48,9 @@ mcuboot_secondary_pad:
4848
mcuboot_secondary_app:
4949
region: external_flash
5050
address: 0x800
51-
size: 0x165800
51+
size: 0x164800
5252
external_flash:
53-
address: 0x166000
54-
size: 0x69a000
53+
address: 0x165000
54+
size: 0x69B000
5555
device: MX25R64
5656
region: external_flash

samples/matter/light_bulb/pm_static_nrf54l15dk_nrf54l15_cpuapp_ns.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
mcuboot:
33
address: 0x0
44
region: flash_primary
5-
size: 0xc000
5+
size: 0xD000
66
mcuboot_pad:
7-
address: 0xc000
7+
address: 0xD000
88
region: flash_primary
99
size: 0x800
1010
tfm:
11-
address: 0xc800
11+
address: 0xD800
1212
region: flash_primary
1313
size: 0x1F800
1414
app:
15-
address: 0x2C000
15+
address: 0x2D000
1616
region: flash_primary
17-
size: 0x13E000
17+
size: 0x13D000
1818
factory_data:
1919
address: 0x16A000
2020
region: flash_primary
2121
size: 0x1000
2222
settings_storage:
2323
address: 0x16B000
2424
region: flash_primary
25-
size: 0xa000
25+
size: 0xA000
2626
tfm_storage:
2727
address: 0x175000
2828
orig_span: &id006
@@ -33,8 +33,8 @@ tfm_storage:
3333
size: 0x8000
3434
span: *id006
3535
external_flash:
36-
address: 0x15E000
37-
size: 0x6A2000
36+
address: 0x15D000
37+
size: 0x6A3000
3838
device: MX25R64
3939
region: external_flash
4040
### Bootloader configuration
@@ -44,24 +44,24 @@ mcuboot_primary:
4444
- tfm
4545
- app
4646
span: *id001
47-
address: 0xc000
47+
address: 0xD000
4848
region: flash_primary
49-
size: 0x15E000
49+
size: 0x15D000
5050
mcuboot_primary_app:
5151
orig_span: &id002
5252
- app
5353
- tfm
5454
span: *id002
55-
address: 0xc800
55+
address: 0xD800
5656
region: flash_primary
57-
size: 0x15D800
57+
size: 0x15C800
5858
mcuboot_secondary:
5959
address: 0x0
6060
orig_span: &id003
6161
- mcuboot_secondary_pad
6262
- mcuboot_secondary_app
6363
region: external_flash
64-
size: 0x15E000
64+
size: 0x15D000
6565
span: *id003
6666
mcuboot_secondary_pad:
6767
region: external_flash
@@ -70,22 +70,22 @@ mcuboot_secondary_pad:
7070
mcuboot_secondary_app:
7171
region: external_flash
7272
address: 0x800
73-
size: 0x15D800
73+
size: 0x15C800
7474
### TFM configuration
7575
tfm_secure:
76-
address: 0xc000
76+
address: 0xD000
7777
orig_span: &id004
7878
- mcuboot_pad
7979
- tfm
8080
region: flash_primary
8181
size: 0x20000
8282
span: *id004
8383
tfm_nonsecure:
84-
address: 0x2C000
84+
address: 0x2D000
8585
orig_span: &id005
8686
- app
8787
region: flash_primary
88-
size: 0x13E000
88+
size: 0x13D000
8989
span: *id005
9090
tfm_its:
9191
address: 0x175000

samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf

Lines changed: 0 additions & 32 deletions
This file was deleted.

samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay

Lines changed: 0 additions & 25 deletions
This file was deleted.

samples/matter/light_bulb/sysbuild/mcuboot/prj.conf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ CONFIG_PM=n
1313
CONFIG_FLASH=y
1414
CONFIG_FPROTECT=y
1515

16-
CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"
17-
1816
# Use minimal C library instead of the Picolib
1917
CONFIG_MINIMAL_LIBC=y
2018

@@ -37,3 +35,8 @@ CONFIG_MULTITHREADING=n
3735
CONFIG_TICKLESS_KERNEL=n
3836
CONFIG_TIMEOUT_64BIT=n
3937
CONFIG_NRF_ENABLE_ICACHE=n
38+
CONFIG_SIZE_OPTIMIZATIONS=y
39+
40+
# Activate LTO
41+
CONFIG_LTO=y
42+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
mcuboot:
22
address: 0x0
33
region: flash_primary
4-
size: 0xc000
4+
size: 0xD000
55
mcuboot_pad:
6-
address: 0xc000
6+
address: 0xD000
77
region: flash_primary
88
size: 0x800
99
app:
10-
address: 0xc800
10+
address: 0xD800
1111
region: flash_primary
12-
size: 0x165800
12+
size: 0x164800
1313
mcuboot_primary:
1414
orig_span: &id001
1515
- mcuboot_pad
1616
- app
1717
span: *id001
18-
address: 0xc000
18+
address: 0xD000
1919
region: flash_primary
20-
size: 0x166000
20+
size: 0x165000
2121
mcuboot_primary_app:
2222
orig_span: &id002
2323
- app
2424
span: *id002
25-
address: 0xc800
25+
address: 0xD800
2626
region: flash_primary
27-
size: 0x165800
27+
size: 0x164800
2828
factory_data:
2929
address: 0x172000
3030
region: flash_primary
3131
size: 0x1000
3232
settings_storage:
3333
address: 0x173000
3434
region: flash_primary
35-
size: 0xa000
35+
size: 0xA000
3636
mcuboot_secondary:
3737
address: 0x0
3838
orig_span: &id003
3939
- mcuboot_secondary_pad
4040
- mcuboot_secondary_app
4141
region: external_flash
42-
size: 0x166000
42+
size: 0x165000
4343
span: *id003
4444
mcuboot_secondary_pad:
4545
region: external_flash
@@ -48,9 +48,9 @@ mcuboot_secondary_pad:
4848
mcuboot_secondary_app:
4949
region: external_flash
5050
address: 0x800
51-
size: 0x165800
51+
size: 0x164800
5252
external_flash:
53-
address: 0x166000
54-
size: 0x69a000
53+
address: 0x165000
54+
size: 0x69B000
5555
device: MX25R64
5656
region: external_flash

0 commit comments

Comments
 (0)