This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430G2553: Problem with RAM Usage

Part Number: MSP430G2553

Tool/software: Code Composer Studio

Hi All,

I am using msp430g2553 for one of my project. The RAM space in this is 512 bytes and the Flash memory available is 16 kB. After writing the program, when I try to compile it, it gives me a error stating 10099-D program doesn't fit into available memory.

Then I gone through the memory allocation view, in that I can notice that the RAM has been overflowed and the Flash memory is used 88%. So, I confirmed (if not wrong) that, the program size is more and the RAM space is not enough to handle all the operations happening in my application.

I started checking out what might caused this problem. I am using powf() function to calculate the decimal power of an number. When I commented out this line (containing powf()), I found that RAM space used is only 54%. I was shocked to see that this powf() function is using more than 50% of RAM in the entire application.

So my question is whether there is any alternative way to calculate the decimal power of a number (for eg: 1.2 ^ 3.22) , so that I can reduce the RAM space. Or any other possible measures can be taken so that my program will completely fit into available memory.

Thanks and Regards,

Subash D.

  • Subash Deva said:
    I was shocked to see that this powf() function is using more than 50% of RAM in the entire application.

    This function pulls the whole floating point "infrastructure", like support and type conversion functions, into your project. If you used another one (like e.g. sinf()), you would see the expected, small increase.

    Better look for an integer algorithm for you code, and avoid floating point all together. Or use another MCU with more RAM.

**Attention** This is a public forum