Mistake on this page? Email us

Device Management Client Lite memory figures

The key feature of the Device Management Client Lite library is its lower memory footprint compared to Device Management Client. This is achieved by using the lighter authentication mechanism of Pre-Shared Keys (PSKs) with Device Management. There are a number of optimizations to the library that make it more compact and less memory-intensive.

The memory figures are highly dependent on the selected hardware configuration, network configuration, and application logic.

An application that runs complicated logic on many LwM2M resources has a large memory footprint. Similarly, certain network configurations are more memory-intensive than others. For instance, an Ethernet-based application adds 45kB of RAM and 55kB of ROM to the binaries. An ESP8266 WiFi-based application does not add extra network code, because the network stack resides on the separate ESP module, not the chip.

We have done some basic memory measurements for the mbed-cloud-client-lite-example-restricted application.

The measurement configuration:

  • A K64F board.
  • Mbed OS (feature-miniclient branch).
  • An ESP8266 WiFi driver.
  • An ARMCC Compiler v5.06.

We used the example application to establish a successful secure connection to Device Management and register the device. The measurement does not include any of the application-side LwM2M resources that are created as part of example application code.

The measurement figures take into account:

  • Device Management Client Lite.
  • Mbed TLS connectivity.
  • Mbed OS.

RAM

38 kB (includes static and dynamic RAM consumption assuming eXecute in Place (XiP)).

ROM (Flash size)

163 kB. The measurement is taken with the release build profile on Mbed OS.

Note: These numbers vary for different toolchains and the different settings for the toolchain. For example, GCC, the flash size is 177 kB and RAM usage 40kB.

You can also impact the numbers by selecting which C libraries you use. You can optimize with careful analysis of the .elf files to ensure nothing unnecessary is included. For example, using printf() pulls in a lot of libraries. There is a blog available for more information. You can also swap out the printf implementation for a smaller alternative.