EmbeddedRelated.com
Forums

linker issue with CCS 6

Started by "wil...@gmail.com [msp430]" February 3, 2016
Might be obvious, but you have checked the optimisation settings in the compiler are the same after the upgrade? Might explain why the code is larger now.

Beginning Microcontrollers with the MSP430

So the problem was the CCS6 settings defaulted to "elf" output format, but
the original build was in "legacy Coff". The reason why the change of
output format from "legacy COFF" to "eabi (ELF)" causes the code size bloat
is that the code calls log10, sqrt and pow which take double arguments. In
COFF double is 32-bits but is 64-bits in ELF. So the issue was .text was
looking like it was trying to be placed at 0x0 in the map file, but 0x0 was
just a placeholder as the code would not fit. Change the output to "legacy
Coff" and the project builds fine...

-Bill
On Thu, 11 Feb 2016 08:54:38 -0800, Bill wrote:

>So the problem was the CCS6 settings defaulted to "elf" output format, but
>the original build was in "legacy Coff". The reason why the change of
>output format from "legacy COFF" to "eabi (ELF)" causes the code size bloat
>is that the code calls log10, sqrt and pow which take double arguments. In
>COFF double is 32-bits but is 64-bits in ELF. So the issue was .text was
>looking like it was trying to be placed at 0x0 in the map file, but 0x0 was
>just a placeholder as the code would not fit. Change the output to "legacy
>Coff" and the project builds fine...
>
>-Bill

Thanks Bill. That's not something I could have guessed at.
But it is very useful to be aware of. Update appreciated!

Jon

Posted by: Jon Kirwan