Re: [avr-gcc-list] Peculiar code size problem

2012-03-19 Thread Parthasaradhi Nayani
Dear Eric,
Yes indeed, the total code bloated, though the function size actually reduced. 
Perhaps my first post was not clear on this point. I can mail you the entire 
code, should you wish to see it. Please let me know so I can do the needful. I 
am wondering as to what this cause is and any method to detect it or at the 
least prevent code bloat. Thank you for your time.
 
Regards,
Nayani





 From: Weddington, Eric eric.wedding...@atmel.com
 Sent: Monday, March 19, 2012 1:44 AM
Subject: RE: [avr-gcc-list] Peculiar code size problem
 

Your function pulse_en reduced in size as expected. However, your
overall code size increased.

Without access to the rest of your code, we cannot tell what causes the
overall size increase.

Eric___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Peculiar code size problem

2012-03-19 Thread Parthasaradhi Nayani
Hello David,
Thank you for your reply. Yes this seem to be the problem Current working 
program with delay call size turned out to be 7092 bytes. With your suggestion 
of noinlie attribute the code is now 7086 bytes. Thank you for your help. 
This seems to have solved the problem and also answered my query. This may also 
help others who have similar problem. Thanks once again.
 
Regards,
Nayani




 From: David A. Lyons dly...@lyons42.com
To: Parthasaradhi Nayani partha_nay...@yahoo.com 
Cc: avr-gcc-list@nongnu.org avr-gcc-list@nongnu.org 
Sent: Monday, March 19, 2012 5:46 AM
Subject: Re: [avr-gcc-list] Peculiar code size problem
 
The smaller size might be making the compiler decide to inline the function at 
some call sites where it didn't before.  You could experiment with 
-fno-inline-small-functions (compiler option) and/or 
__attribute__((noinline)) on your function declaration:

    void pulse_en (void) __attribute__((noinline));

    void pulse_en (void)
    {
        ...
    }

Cheers,

--Dave___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list


[avr-gcc-list] gcc 4.7 changes

2012-03-19 Thread Ruud Vlaming
On http://gcc.gnu.org/gcc-4.7/changes.html 
i saw some very interesting changes listed 
regarding the AVR. I did not have the time
yet to see what it results in, but i am very 
curious about other experiences.

Ruud

___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list