Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: matter: Reduce memory usage #18554

Merged
merged 3 commits into from
Dec 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,14 @@ The static size is determined by the :kconfig:option:`CONFIG_CHIP_MALLOC_SYS_HEA
To use a dynamic heap size on your Matter device, set them both to ``n``.

The static heap size means that you can define the maximum heap size for your application by setting the :kconfig:option:`CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE` Kconfig value.
You can also adjust the heap dedicated for MbedTLS purposes by setting the :kconfig:option:`CONFIG_MBEDTLS_HEAP_SIZE` Kconfig option value.
You can also adjust the heap dedicated for Mbed TLS purposes by setting the :kconfig:option:`CONFIG_MBEDTLS_HEAP_SIZE` Kconfig option value.

Packet buffer pool size
-----------------------

The Matter application uses a fixed-size pool for packet buffer memory management.
The pool size is determined by the :kconfig:option:`CONFIG_CHIP_SYSTEM_PACKETBUFFER_POOL_SIZE` Kconfig option.
You can adjust the pool size to reduce the memory usage of your application, but that can have a negative effect on the performance of the application.

.. note::
The Thread protocol has a separate configuration for memory allocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
CONFIG_CHIP_NFC_COMMISSIONING=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
CONFIG_CHIP_NFC_COMMISSIONING=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
CONFIG_CHIP_NFC_COMMISSIONING=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
CONFIG_CHIP_NFC_COMMISSIONING=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
CONFIG_CHIP_NFC_COMMISSIONING=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ manifest:
- name: matter
repo-path: sdk-connectedhomeip
path: modules/lib/matter
revision: 20babbe7904f55511c39f19cae2162f7b770f974
revision: 2340e0aad89bd415a3a1faa0af0da69169c8aa4a
west-commands: scripts/west/west-commands.yml
submodules:
- name: nlio
Expand Down
Loading