Application Flash / RAM size

As part of the build process, information on the size of your application will normally be displayed at the end of the build log in the Console view. This is done by a post-build step invoking the arm-none-eabi-size utility....

   text    data     bss     dec     hex filename
   2624     524      32    3180     c6c LPCXpresso1768_systick_twinkle.axf

[All numbers are in bytes.]

Typically,

Remember that the RAM consumption provided by this is only that of your global data. It will not include any memory consumed by your stack and heap when your application is actually executing.

You can also manually run the arm-none-eabi-size utility on both your final application image, or on individual object files.

To view the size of the image, right click over the .axf file in the Debug or Release subdirectory of your application project and select the Binary Utilities -> Size option. To view the size of an individual object file, select the appropriate .o file in the Debug\src or Release\src subdirectory of the project and again select the Binary Utilities -> Size option.

Linker map files

The linker option "-Map" option, which is enabled by default by the project wizard when a new project is created, allows you to analyse in more detail the contents of your application image. When you do a build, this will cause a file called <application>.map to be created in the Debug (or Release) subdirectory, which can be loaded into the editor view.

This contains a large amount of information, including:

Other utilities

The arm-none-eabi-nm utility can sometime be useful when looking at the size of your application, as it can produce some of the information provided in the linker map file but in a more concise form. For example:

arm-none-eabi-nm -S --size-sort -s project.axf

produces a list of all the symbols in an image, their sizes and their addresses, listed in size order. For more information on this utility, please see the GNU binutils documentation.

Note that you can run arm-none-eabi-nm as a post-build step, or else open a command shell using the status bar shortcuts.

FlashRamSize (last edited 2011-03-24 15:32:46 by CrSupportAb)