I can't see an option on the ARM compiler to keep the preprocessor output and do the compile.
I can see:
-E: Just do the preprocessing;
-C: as above, but keep comments;
-P: Just do the preprocessing, without #line markers.
But I can't see one to do the preprocessing and the compile.
ie, the equivalent of -save-temps for GCC
gcc.gnu.org/.../Debugging-Options.html
Is there such a thing for Keil/ARM?
When you select the options in the IDE it does the job, but the output window shows:
creating preprocessor file for XXX.C... compiling XXX.C...
That suggests to me that it does one thing at a time.
It's not doing that for me:
When I specify -C in the IDE options, the .o output file created is a preprocessor listing instead of a compiled object.
Aha! There is a 'C Preprocessor Listing' option on the 'Listings' tab of the Project options.
Checking that option does as you say - for the whole project.
I was just looking at the options for a specific file, and there is no GUI setting there - hence manually adding the -C command-line option.
But the project-wide option will do just fine - many thanks!
:-)
I'm not setting command line options. Just using the IDE check boxes.
Specifically:
Options for Target->Listing->C Preprocessor Listing
It then creates a .i file and a .o file
Ahhh ... you posted the same time as me.