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.