On Wed, May 16, 2012 at 2:04 PM, Adam Ford <adam.f...@braemarinc.com> wrote:
> Thanks.
>
> do you see any harm in compiling the libc with the -fdata-sections
> -ffunction-sections  CFLAGs set?

No; in fact that's the default for the 4.7.x development series.
There should be no issues with the library using those flags; if there
are, report it as a tracker item and I'll get it fixed.

Peter

> When I compile the library without the 64-bit printf and those flags
> set, I can successfully link my code. But before I do that, I wanted to
> know if that would break something.  I have the -gc-sections linker flag
> set in my code's LDFLAG.
>
> Thanks
>
> adam
>
> On 05/16/2012 01:02 PM, Peter Bigot wrote:
>> On Wed, May 16, 2012 at 10:14 AM, Adam Ford<adam.f...@braemarinc.com>  wrote:
>>> I'm sorry for bugging people, and I have Googled this question, but the
>>> answers I'm finding are really old and I know there are updates to
>>> mspgcc since most of the answers were posted....
>>>
>>> I am trying to port 3 different programs from IAR to MSPGCC for work.
>>> I'm using the latest released version, but 2 of the 3 won't fit even
>>> when compiling using optimizations: -mmcu=$(MCU) -g -Os -Wall
>>> -fdata-sections -ffunction-sections  and linked with --no-keep-memory
>>> -Wl,-gc-sections
>>>
>>> Does anyone have any ideas how I can further optimize the compiler
>>> (other than rewriting - which I've been trying to do)?
>> The biggest low-hanging fruit I've found is to avoid printf(3c), which
>> adds about 2 kB.  If you can't avoid it, you can get a few hundred
>> bytes back by building an msp430-libc that doesn't support printing
>> 64-bit integers.  Look at the README at the top level of msp430-libc
>> and invoke configure appropriately.
>>
>> Beyond that rather unhelpful suggestion, no, there are no magic flags
>> that I know of.
>>
>> Peter
>>
>>> With an MSP430F149 processor, under IAR, the code compiles and links
>>> (Code = 45858, data = 3000, CONST=4935)
>>>
>>> Under GCC, it won't link because '.rodata won't fit into region rom' and
>>> rom overflows by 796 bytes.
>>>
>>> Examining the Map file shows .rodata is 0x1a66 in size, .text is 0xc240
>>> in size, .bss is 0x712
>>>
>>> Any ideas how to make the libraries or optimizer make smaller code?
>>>
>>> adam
>>>
>>> This email, including any attachments and files transmitted with it, are 
>>> for the sole use of the intended recipient(s) to whom this email is 
>>> addressed, and may contain confidential and/or privileged information. Any 
>>> unauthorized review, use, disclosure or distribution is prohibited. If you 
>>> are not the intended recipient, please be advised that you have received 
>>> this email in error, and please contact the sender by reply email and 
>>> destroy all copies (including all electronic and hard copies) of the 
>>> original message. Thank you.
>> I wonder if we need to add a disclaimer to the list saying that
>> confidentiality disclaimers are meaningless when sent to a publicly
>> archived mailing list.
>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Mspgcc-users mailing list
>>> Mspgcc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
> This email, including any attachments and files transmitted with it, are for 
> the sole use of the intended recipient(s) to whom this email is addressed, 
> and may contain confidential and/or privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not the 
> intended recipient, please be advised that you have received this email in 
> error, and please contact the sender by reply email and destroy all copies 
> (including all electronic and hard copies) of the original message. Thank you.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to