Jump to content

FLASH and Estimated RAM Usage

Recommended Posts

As I said in the other topic. This is only the case for RAM usage that can be determined at compile time. It consists only of the statically mapped memory (static and global variables) and the compiler defined stack.

If you allocate memory dynamically (using new or malloc, or the (implicit) reserve() method on STL container classes) it will not show up in your report. This memory is only allocated at run time.

Avoid using dynamically allocated memory as much as possible, since it required the C++ runtime to link a memory management routine, taking memory and flash of its own. Additionally, it makes debugging very hard, as allocating memory may fail without you knowing it. In embedded systems another drawback of dynamic memory is that memory can get fragmented leaving you with no continuous block of free RAM to allocate a new instance of your memory block. This will prevent your system from running forever (or until errors start to occur).

Link to post
Share on other sites

Those metrics are better than nothing!


If the RAM estimated is close to the maximum RAM, then there's a problem.


I'm just trying to give basic tools so Energia users can be self-reliant.


You can't imagine how often the Energia project receives such kind of questions and how much time we dedicate to answering them, at the expense of new developments.


I guess advanced LaunchPad users don't use Energia but CCS.

Link to post
Share on other sites

I use IAR :P, and I could not function if I couldn't see the code and ram usage when it compiles. IAR has an option to show that in the debug console. Couldn't Energia be changed to run that command any time a file is built, and add it to the console it has?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...