avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Parthasaradhi Nayani
Subject: Re: [avr-gcc-list] Peculiar code size problem
Date: Mon, 19 Mar 2012 03:49:31 -0700 (PDT)

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 <address@hidden>
To: Parthasaradhi Nayani <address@hidden>
Cc: "address@hidden" <address@hidden>
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]