Keil Logo

ARM: Resource Requirements of Software Components

Information in this knowledgebase article applies to:

  • MDK-ARM Version 5
  • MDK Middleware Version 6
  • MDK Middleware Version 7


As a system architect, I need to know the resource requirements of a software component so that I can configure the overall system. An exact number in bytes is not my expectation, but I do need an approximation of the component size. The resource requirements of a software component are composed of:

  • Static Memory Requirements: are the static memory used by a component in ROM (code, RO-data) and RAM (RW-data, ZI-data). Sizes can be an estimates as it depends on compiler optimizations, Cortex-M instruction set, and configuration settings of a software component.
  • Stack Memory Requirements: are the thread stack and interrupt (main) stack requirements. Callback functions to user application and I/O drivers may impact the stack usage and such dependencies should be clearly described.
  • Dynamic Memory Requirements: refer to the memory that is allocated from the heap or other memory pools. The potential dependencies on the processing of specific data packages should be indicated for testing purposes. True dynamic memory allocation may cause memory fragmentation and some components allocate memory once and never released it for that reason. The dynamic nature of memory allocation should be clearly documented.
  • Thread Execution Requirements: Software components that require threads may have requirements on the thread priority if they interact with other threads.

It is important to understand the requirements of a software component and in this context I have several questions:

  • For MDK middleware, are the resource requirements published somewhere?
  • Is there tool support to calculate the resource requirements of a software component?


The MDK middleware documentation explains how to configure the various resources and each middleware component contains a Resource Requirements section that describes requirements for various configurations.

As for the tool support, the following functionality is available today:

  • The linker map file contains details about the static memory usage of each software component. This information can be used to determine the exact memory usage for each component. As as provider of a software component, you should provide information for various configurations and processors as well as the maximum static memory usage. This may require multiple linker runs.
  • RTX offers the configuration option Stack usage watermarking. Using this option the thread stack usage can be reviewed during operation in the System and Thread Viewer of the µVision Debugger.



Last Reviewed: Tuesday, April 4, 2017

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.