matter door lock flash space problem

I am developing a matter door lock. After adding our own application code, the space is very tight. Can these two data areas be moved to external flash?

factory_data:
  address: 0xf7000
  size: 0x1000
  region: flash_primary
settings_storage:
  address: 0xf8000
  size: 0x8000
  region: flash_primary

Parents
  • Hello,

    I asked our Matter team about this, and they adviced against relocating these partitions to external flash:

    "External flash is limited and very slow, so it is not recommended to use Zephyr Settings there. It impacts even boot time, which goes to unacceptable values. Regarding factory data, it also is not recommended to store it in the External flash space because this is a security issue. If they really want to store factory data there, they must ensure that all data is encrypted, or provide other security. We don't support it in our samples and applications within NCS. If they want to optimize the code size we can recommend testing LTO (Link time optimization) which is still experimental, but it reduces the FLASH usage much. Moreover, they can consider using XIP to store a part of the application on the external flash instead of moving their settings or factory data. If they're using WiFi, in the future the Firmware Patch for the nRF7000 chip will be stored automatically in the external flash that frees internal flash space with an additional ~60 kB."

    Note: experimental support for LTO got introduced in SDK v2.6.0

    Best regards,

    Vidar

  • By adding CONFIG_LTO=y and
    CONFIG_ISR_TABLES_LOCAL_DECLARATION=y to your project configuration file.

  • Will this configuration cause some unforeseen failures? Can it ensure the stable operation of the software?

Reply Children
Related