https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38629
Federico Fissore <federico at fsfe dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |federico at fsfe dot org --- Comment #7 from Federico Fissore <federico at fsfe dot org> --- Created attachment 35278 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35278&action=edit big function gets inlined making a too big arduino sketch I would like to revive this issue but submitting another test case. The attached sketch file has a "move3Servos" function that gets inlined, causing the sketch size to exceeds the size of the flash (49K with a max size of 32K) You can work around the problem adding an attribute noinline __attribute__((noinline)) void move3Servos(Servo servo1Name, float target_pos1, Servo servo2Name, float target_pos2, Servo servo3Name, float target_pos3, float easing) { Doing so reduces the compiled sketch size down to 12K, which is a lot less than 49K If you're interested in the original discussion, see https://github.com/arduino/Arduino/issues/2930