Rei Vilo 695 Posted April 10, 2013 Share Posted April 10, 2013 To know the FLASH and an estimate of the RAM used, find the location of the size utility /Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-size compile a sketch and find the location of the elf file bluehash 1 Quote Link to post Share on other sites
roadrunner84 466 Posted April 10, 2013 Share Posted April 10, 2013 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). Quote Link to post Share on other sites
spirilis 1,265 Posted April 10, 2013 Share Posted April 10, 2013 It'll also not tell you how much Stack you use with your various buffer allocations et al when executing functions, aye? Quote Link to post Share on other sites
roadrunner84 466 Posted April 10, 2013 Share Posted April 10, 2013 No it won't, but your compiler or linker might tell you what the maximum stack usage is (tracing the deepest path it can take in calls) and maybe even warn you when you exceed the set stack size (IAR has a default stack size of 50 bytes for the MSP430G2231). Quote Link to post Share on other sites
Rei Vilo 695 Posted April 10, 2013 Author Share Posted April 10, 2013 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. Quote Link to post Share on other sites
cde 334 Posted April 10, 2013 Share Posted April 10, 2013 I use IAR , 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? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.