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 v 4 &5 produce loads much bigger than v3. Removed the math function pow and flash went unused 468H(1112D) to 2E70H(11,888D). It all had to do with removal of the eabi.lib functions which were included by the compiler due to two usages of the pow function in the code.
Look at your memory map in the text printout for the amount of memory used by each module.
Please see this wiki article for a method to see, function by function, where any code size increase is coming from. That might help you better understand what is happening.
Thanks and regards,
-George
Does your code need 32-bit or 64-bit floating point calculations?Jerry Bonner said:It all had to do with removal of the eabi.lib functions which were included by the compiler due to two usages of the pow function in the code.
If only 32-bit floating point calculations are required then changing from pow (which uses double arguments) to powf (which uses float arguments) may reduce the code size.
Also, which device are you targeting?
Same results with MSP430F1xx, MSP430F2xx and MSP430F5529. It seems the entire library was included when the pow function was used in only two different lines of code. Since there were only five possible powers needed, inline code was used to replace the pow function. But, that produced huge memory savings. It was reasonable to replace th pow with either if code or with switch and case code.