Rei Vilo 695 Posted June 5, 2012 Share Posted June 5, 2012 Compared to other embedded computing platforms, the MSP430 puts memory usage under heavy stress. What are the consequences of the programming style? I took a basic thermometer example with a moving average algorithm and played with different options. Thermometer_basic.zip Thermometer_function.zip Thermometer_class.zip Thermometer_library.zip bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted June 5, 2012 Share Posted June 5, 2012 Thanks Rei, This is an awesome test. Quote Link to post Share on other sites
Rickta59 589 Posted June 5, 2012 Share Posted June 5, 2012 Compared to other embedded computing platforms, the MSP430 puts memory usage under heavy stress. I'm not sure I would agree with that. As with everything, It all depends on what you are doing. If you take the ASCIITable example and compile it on Energia 1.0 it only uses 1,518 bytes. On Arduino 1.0 that same example needs 2704 bytes. BlinkWithoutDelay on Energia is 628 bytes, on Arduino it is 1002 bytes. Depending on the chip ( g2231 vs g2553 ) it can be smaller or larger depending on what the code does. I don't see how that puts memory usage under heavy stress. -rick Quote Link to post Share on other sites
Rei Vilo 695 Posted June 21, 2012 Author Share Posted June 21, 2012 I performed a test with a basic blinking LED sketch (embed1 attached below) compiled by the different Processing-based Wiring-derived IDEs, with their default parameters. Here are the results: Good news, the LaunchPad delivers the more compact executable. As Rickta59 rightly points out, it all depends on what you are doing. But the news is worth knowing it. embed1.zip energia and bluehash 2 Quote Link to post Share on other sites
oPossum 1,083 Posted June 21, 2012 Share Posted June 21, 2012 It only takes 5 words to make an LED blink on MSP430 ; Blink LED on P1.1 - This will work on most MSP430 .def main main: .word 0x4392, 0x0022, 0xE392, 0x0021, 0x3FFF Tribes 1 Quote Link to post Share on other sites
energia 485 Posted June 21, 2012 Share Posted June 21, 2012 Thanks for running those test Rei Vilo! Great to know! Quote Link to post Share on other sites
Nytblade 24 Posted June 24, 2012 Share Posted June 24, 2012 Any size difference between the code generated by the TI C Compiler versus GCC? Quote Link to post Share on other sites
xv4y 46 Posted January 13, 2013 Share Posted January 13, 2013 With Arduino (I don't know about the Due), you don't have the full 32kb for you, around 2kb is used by the bootloader. Yan. Quote Link to post Share on other sites
RichardVowles 12 Posted January 14, 2013 Share Posted January 14, 2013 I'm just working on exactly this problem and man, is that Adafruit code flabby or what? I'm doing mine in Energia as well, but it will use way way less memory. Quote Link to post Share on other sites
yyrkoon 250 Posted January 14, 2013 Share Posted January 14, 2013 I'd like to get my hands on the innards someday, and tweak it for even less memory usage ( by default ) Quote Link to post Share on other sites
Rickta59 589 Posted January 14, 2013 Share Posted January 14, 2013 I'd like to get my hands on the innards someday, and tweak it for even less memory usage ( by default ) The code is all there to see: https://github.com/energia/Energia/tree/master/hardware/msp430/cores/msp430 We aren't wasting that much memory or code space. 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.