Openthread Optimised Library & Build Size

Our product under development has tight flash requirements. As such, any optimisation to the build size of the product has a great affect on further development, therefore, we are investigating reducing our flash size by using the optimised FTD provided by the NRF5 SDK for Thread & Zigbee.

When using the optimised FTD compared against building Openthread from the source with the same switches on Reference 20200818, the provided library is ~5kb larger in build size on our stack.

Is this expected?

Are there any other optimisations that can be done within the NRF5 SDK to reduce build size?

Parents
  • Hi Charlie,

    Thank you for answering the question in regards to further optimisations, I thought it might be a long shot. I am aware of the connect SDK, and we will be using this for future development, however, we are currently locked into the legacy support for this particular device. 

    The comparison is done by taking the ELF file generated using the pre-compiled library, and looking at the symbol namespace for the openthread library. For example, when using the pre-compiled optimised FTD library, the ot::commissioner:: namespace exists, something which described by the NRF5 SDK for Thread & Zigbee 4.2 should be turned off. When compiling directly on thread reference 20200818 (The reference I assume to be used by SDK gathered from other questions on this forum), the commissioner namespace does not exist (Other namespaces exist which I wouldn't expect, commissioner was just used for the example).

    The Optimised FTD is imported using the following CMake:

        PUBLIC libopenthread-ftd-optimized-ftd.a
        PUBLIC libopenthread-platform-utils-optimized-ftd.a
        PUBLIC libopenthread-nrf52840-softdevice-sdk-nodiag.a
        PUBLIC libopenthread-nrf52840-transport.a
        PUBLIC libnordicsemi-nrf52840-radio-driver-softdevice.a

Reply
  • Hi Charlie,

    Thank you for answering the question in regards to further optimisations, I thought it might be a long shot. I am aware of the connect SDK, and we will be using this for future development, however, we are currently locked into the legacy support for this particular device. 

    The comparison is done by taking the ELF file generated using the pre-compiled library, and looking at the symbol namespace for the openthread library. For example, when using the pre-compiled optimised FTD library, the ot::commissioner:: namespace exists, something which described by the NRF5 SDK for Thread & Zigbee 4.2 should be turned off. When compiling directly on thread reference 20200818 (The reference I assume to be used by SDK gathered from other questions on this forum), the commissioner namespace does not exist (Other namespaces exist which I wouldn't expect, commissioner was just used for the example).

    The Optimised FTD is imported using the following CMake:

        PUBLIC libopenthread-ftd-optimized-ftd.a
        PUBLIC libopenthread-platform-utils-optimized-ftd.a
        PUBLIC libopenthread-nrf52840-softdevice-sdk-nodiag.a
        PUBLIC libopenthread-nrf52840-transport.a
        PUBLIC libnordicsemi-nrf52840-radio-driver-softdevice.a

Children
No Data
Related