nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

Matter on the nRF52840: Is 1MB a safe bet?

Building the default binary of the Matter example all-cluster-app for the nRF52840 results in a binary of more than 900kB. Switching the optimization from min-size to debug-friendly exceeds the 1MB of available flash, building it using the overlay-low_power.conf overlay gets the size down to ~750 kB.

Does Nordic consider the nRf52840s internal flash (1MB) to be big enough to support Matter and leaving 250+ kB space for the application itself in the long run? Will Nordic put efforts into keeping or even lowering the memory footprint to stay well below 750kB?

Background: Considering to switch from two 500kB internal partitions (A/B) to having the full internal flash available for program code, and adding an external 8Mbit flash for storing updates.

  • Reto said:
    The scary part is that we still end up with strings like those:

    Can you try to set the config CONFIG_ASSERT_NO_FILE_INFO as well?

    Reto said:
    I do understand, given that Matter is still a bit secretive/early stage. However, it would be reassuring to see some real names. In case it helps: My employer does have a NDA with Nordic and I'd be grateful for getting names in a private message.

    Unfortunately, I'm not able to disclose any customer names in this forum. You can contact your regional sales manager through the "sales related questions" form on the Contact Us page, they may be able to help you out with some more details.

  • Can you try to set the config CONFIG_ASSERT_NO_FILE_INFO as well?

    Unlikely to help as ASSERT is disabled in the first place.

    Tried it anyway to confirm:

    $ grep CONFIG_ASSERT_NO_FILE_INFO zephyr/.config
    CONFIG_ASSERT_NO_FILE_INFO=y
    $ ninja
    [0/8] Performing build step for 'chip-gn'
    Generating compile_commands took 6ms
    Done. Made 71 targets from 80 files in 22ms
    ninja: no work to do.
    [1/6] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [3/3] cd <censored>/build-nrf52840dk_nrf52840-li...user.h"" -P <censored>/ncs/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DUA_ENABLE=1
    OPENTHREAD_CONFIG_MLR_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JOINER_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=2
    BUILD_VERSION=v2.7.99-ncs1-17-gc3208e7ff49d
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=1
    __PROGRAM_START
    NRF52840_XXAA
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_CSMA_CA_ENABLED=1
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
    $ strings zephyr/zephyr.bin | grep WEST
    WEST_TOPDIR/modules/lib/matter/src/app/clusters/level-control/level-control.cpp
    WEST_TOPDIR/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c
    WEST_TOPDIR/nrfxlib/nrf_802154/sl/platform/hp_timer/nrf_802154_hp_timer.c
    WEST_TOPDIR/nrf/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_zephyr.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_aes_ccm.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_core.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_critical_section.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_encrypt.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_pib.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_queue.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_trx.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_tx_work_buffer.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_csma_ca.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_delayed_trx.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_filter.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_frame_parser.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_ie_writer.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_utils_byteorder.h
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_ifs.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_security_pib_ram.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_security_writer.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/nrf_802154_precise_ack_timeout.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_data.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_generator.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_enh_ack_generator.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_notification_swi.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_priority_drop_swi.c
    WEST_TOPDIR/nrfxlib/nrf_802154/driver/src/nrf_802154_request_swi.c

Related