NANO Project was getting cluttered with a lot of debug stuff, and the code size did not change as expected when I removed it. Tried switching to a different board ( a Genuino or a Mega I think) in the IDE to force a full re-compile, and sure enough the code size went own a great deal. But when i switched back to my actual board and re-built, despite the message saying the full rebuild would happen due to the board change, the size came right back up. Is there a way to physically delete all intirim build files to REALLY force a full rebuild?
If you enable verbose mode when compiling, you'll see the build directory being used. Delete that directory, and build again. All new files get copied...
Closing the IDE should remove the temporary build folder, reopen the IDE and all should be rebuild from scratch.
You can also save it under a different name.
Thanks everyone. All these methods worked!
I'm very curious as to what sort of things were NOT automatically re-built after you changed the source code.
westfw:
I'm very curious as to what sort of things were NOT automatically re-built after you changed the source code.
If it happens again I'll have to turn on verbose mode and try to pinpoint it. But right now I'm guessing it has something to do with floating point math. I work extra hard to avoid FP math in my code with the usual tricks, but I was testing a "new to me" digital temp sensor with some test code I had downloaded. It also didn't use FP math, but I threw in a quick conversion to Fahrenheit which did, and not surprisingly the code space jumped by several % points. I replaced my quickie code with a non FP method. When the code space didn't go down as expected. I complete removed the conversion and that didn't help either. After exiting and recompiling after a restart, the original code space % came back, and adding my non-FP conversion did not affect it.
So based on that, I'd reasonably conclud it had something to do with FP math components.