Even in full/pro mode, merely adding an unrelated source file to the project (which never gets referenced/called in the code) adds a significant amount of data to the program space. Shouldn't the compiler be smart enough to remove the unused code? This is probably the simplest optimization that can be done. And xc32 is basically gcc, so what's going on? I'd expect any half-decent C compiler to omit code that doesn't get called, especially when invoked with the -Os (optimize for size) flag. Nothing in the extra code is even declared volatile, so I can't think of any reason at all why it's getting added to the compiled output. Furthermore, declaring macros like this: #define abc 48e6 as opposed to this: #define abc 48000000 also adds significant size (around +6% on a PIC32MX220F032B) to the program space usage. What could I possibly be doing wrong? --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .