**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

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.]


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.

NOTE : Looking at the size of the AXF file on disk does not provide any information as to how much Flash/RAM space your application will occupy when downloaded to your MCU. The AXF file contains a lot more information than just the binary code of your application, for example the debug data used to provide source level information when debugging, that is never downloaded to your MCU.

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 2013-05-09 13:40:50 by CrSupportAb)