what is scatter file? what is its advantage? Kindly tell, i do not anything about these.
Thanks Sukhdeep Singh
If you need preprocessed scatter files, then I think you should write your own pre-link step.
... then, I suppose, you could feed them through the 'C' prepropcessor?
Remember: the so-called "C Preprocessor" actually knows nothing about the 'C' language or syntax - it is really just a text file processor.
I worked on a project once where the 'C' preprocessor was used to preprocess the linker scripts (althouh they weren't ARM scatter files).
I'll try to do that. thanks.
Not so.
The preprocessing phases of a C compiler do know quite a but about C syntax. The preprocessor parses character and string literals, integers and float constants, and it knows enough about identifiers and operators to notice that it should macro-expand only one instance of "E2" to 2E0 in the following snippet:
#define E2 2E0 0xA0E2+1.5E2+MILE2+E2_2+E2+sizeof('E2')+strlen("E2")
That goes well beyond "just a text file processor".