The linker, which is checking the license limitations, only considers allocated objects.
However the linker checks the objects which are read in from the C compiler, not the ones which
are written to the generated ELF file.
This is significant in multiple ways, first only C is limited, not other contributions. Well this would help you as you can indeed link apps > 32k, just as long as the >32k part is not from C.
However the linker counts initialized variables to the limit as well, not just code. Basically any content from C.
Therefore a struct like "int sample_arr[1000] = {1}; " counts as 2000 bytes even though when finally emitting the ELF file, the linker will only emit the information to zero out the whole thing and to write a single 1. So in the final ELF file this sample_arr variable only adds a few bytes to the ROM image (in the copy down and zero out data structures). That's why you can end up with a flash size smaller than 32k and still the linker starts complaining when you add one more byte to the app.
Daniel
Message Edited by CompilerGuru on 2010-02-01 02:06 AM