|
From: | Dave Hylands |
Subject: | Re: [avr-gcc-list] Question about code size |
Date: | Fri, 16 Mar 2007 00:00:19 -0800 |
hi Erik.
Does -fno-default-inline do any good?
I get the following warning: cc1: warning: command line option "-fno-default-inline" is valid for C++/ObjC++ but not for C
> It seems to be inlining the putch function which is called many times, > and the inlined version is quite a bit bigger than calling the > function. If the above doesn't do it, how about: #define NOINLINE __attribute__ ((__noinline__)) on the functions that shouldn't be inlined? (OK, that could be laborious if there are a lot of them. :-)
That seems to work. If I put it front of every function, then I get the size down to 890 bytes (it was 1366 bytes before this). The 3.4.5 compiler generated 848 bytes. At least the bootloader is under 1k again. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/
[Prev in Thread] | Current Thread | [Next in Thread] |