Skip to content

FLASH and estimated RAM Usage

rei-vilo edited this page Apr 10, 2013 · 8 revisions

Procedure

To know the FLASH and an estimate of the RAM usage,

  • Find the location of the size utility
For MSP430
  /Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-size
For Stellaris LM4F
  /Applications/Energia.app/Contents/Resources/Java/hardware/tools/lm4f/bin/arm-none-eabi-size
  • Compile a sketch and find the location of the elf file –see attached screen-shots on how to find the location on the console
  /var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build7439050874009286986.tmp/Blink.cpp.elf`
  • Open a terminal window and type the command
For MSP430
   $/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-size /var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build7439050874009286986.tmp/Blink.cpp.elf
   text	   data	    bss	    dec	    hex	filename
    590	      0	      6	    596	    254/var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build7439050874009286986.tmp/Blink.cpp.elf
For Stellaris LM4F
   $/Applications/Energia.app/Contents/Resources/Java/hardware/tools/lm4f/bin/arm-none-eabi-size /var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build6836538960609975065.tmp/Blink.cpp.elf
   text	   data	    bss	    dec	    hex	filename
   2004	      0	    200	   2204	    89c	/var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build6836538960609975065.tmp/Blink.cpp.elf
  • Do the maths
  text + data = FLASH
  bss + data = estimated SRAM

Please note this is only an estimate, but if the estimated SRAM is close to the maximum, you're going to experience some problems.

Maximum FLASH and RAM

Remember

  • MSP430G2452 = 8 KB of FLASH and 256 bytes of RAM
  • MSP430G2553 = 16 KB of FLASH and 512 bytes of RAM
  • Stellaris LM4F120H5QR = 256 KB FLASH and 32 KB RAM

Finding the Location of the elf file

To find the location of the elf file

  • Select Show verbose output during compilation in Preferences
  • Copy the full path of the elf file from the console