This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840dk (PCA10056) Code size Openthread, zephyr.

Hello

I am building a code with Openthread (NCS V1.4.0) and the size of that generated Bin file is 405kB. I would like to know why size of that file is more? I need to reduced that size, so please suggest some solution for that. I have already refereed the documents of memory optimisation but size is reduced through that is only 50kB.

I want to reduced size upto 250kB to 300kB.

Best Regards,

Stay Safe,

Hinal Tailor

  • Hi Hinal,

    Depends on the OT device role and features you enabled, the code size could vary a lot.

    If you are testing with the thread cli example, the minimal code size should be around 400KB, since it is used as an FTD and with a complete set of OpenThread features enabled by OPENTHREAD_NORDIC_LIBRARY_MASTER — Kconfig reference (nordicsemi.com). I tried with thread CoAP client example. It gives a code size of 272KB with only CoAP related libraries enabled. You can further cut this down if your device only works as MTD. 

    Please try to optimize your code to keep only the necessary features. If you need a more powerful device, you probably need to think about using NRF52840 as an NCP and move your application to a host processor.

    Best regards,

    Charlie

Related