Openthread NCP Flash/Memory requirements.

132 views
Skip to first unread message

Neal Jackson

unread,
Jun 15, 2018, 7:58:53 PM6/15/18
to openthread-users
Hello!

What are the flash/memory requirements for a full thread device operating as an NCP?

I'm building a low cost thread NCP dongle based on the KW21Z, and I wasn't able to find documentation regarding flash/memory requirements. The platform page link to the porting guide purports to include hardware requirements, but I wasn't able to find any regarding flash/memory sizes. There is this old discussion that claims Openthread can fit in 80kB of flash and 18kB of RAM, but it seems like this has changed since 2016. When I compile the NCP app for the KW41Z, it appears the code size is much larger than 80kB, closer to 270kB.

arm-none-eabi-size -x ot-ncp-ftd
   text    data     bss     dec     hex filename
0x3b384   0x278 0x5ed8 267476   414d4 ot-ncp-ftd

Since I'd like the thread dongle to be low cost, I'd like to use the 256kB/64kB configuration of the KW21Z. Based on the current code size of the NCP app however, I don't think it will fit. Is this really how big Openthread is? If so, is there a way to decrease code size to less than 270kB?

Thanks!

Jonathan Hui

unread,
Jun 15, 2018, 8:59:59 PM6/15/18
to nealsj...@gmail.com, openthread-users
Code size on the IEEE 802.15.4 SoC largely depends on how you plan to configure and implement OpenThread on your platform architecture.

As you know, OpenThread is highly configurable.  A few impactful configuration options are described below.

The first is whether OpenThread core library needs to run on the IEEE 802.15.4 SoC.  As noted on the platform designs page, it is possible to implement just the MAC/PHY on the IEEE 802.15.4 SoC, making it possible to utilize the smallest IEEE 802.15.4 SoCs available on the market.  We are actively working to support this architecture.

   text    data     bss     dec     hex filename
  24475    4560    2380   31415    7ab7 output/cc2538/bin/ot-ncp-radio

If you need the OpenThread FTD library to run on the IEEE 802.15.4 SoC, the second is whether the NCP needs to perform Thread Commissioning on the NCP.  If you do not need Thread Commissioning on the NCP:

   text    data     bss     dec     hex filename
 153555    4568   14516 172639   2a25f output/cc2538/bin/ot-ncp-ftd

If you choose to implement Thread Commissioning on the IEEE 802.15.4 SoC, the NCP firmware grows further (largely due to including mbedtls' implementation of DTLS and ECJ-PAKE).

   text    data     bss     dec     hex filename
 218751    4588   21944 245283   3be23 output/cc2538/bin/ot-ncp-ftd

Yes, the code size has grown in the past two years.  Since then, the Thread 1.1 specification was released, which has significant new features on top of Thread 1.0.  Also, as we gain real deployment experience, we have implemented a number of other enhancements that we have found useful above and beyond the base Thread specification.

Builds above were generated with the latest commit (63257be).

Hope that helps.

--
Jonathan Hui

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/2fca35c8-dfff-4538-8aea-28eda10a5e9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Neal Jackson

unread,
Jun 18, 2018, 2:30:51 PM6/18/18
to openthread-users
Hi Jonathan,

Thanks for the clarification and detailed examples. I think this is enough to get me started.
Reply all
Reply to author
Forward
0 new messages