capturing the concatenated c file?

I have run into a out of memory situation for a small attiny85 project -- I was able to manually go thru libraries and other include files to trim it all down to fit. It was tedious.

In the early years (K&R era) I recall you could tell the compiler to take all the files and create a single C file. You could then compile that single file...

Is there a way to tell the Arduino IDE to just 'Compile & save the resulting file?" - ie: the file that would be eventually handed off to gcc

How would that save memory? To answer your question though, I don’t believe there is an easy way, because of the various libraries that are linked in.

However the linker does drop out most unused code from the libs. What have you run out of SRAM of Eprom?

Post your code we may see something.


I don’t want to disappoint you, but the IDE already does that. It munges all the ,ino files into one giant C++ file.

And you are misremembering the K&R era. Unless you had a special compiler. Combining all the files is what don’t want to do because of scope issues.

I don't think a single file would save memory at all. Whatever changes you make that save memory might as well be made to the individual files. I suppose there might be some compiler optimizations that could apply to one large file but that would be about it.