µVISION: USING SRC FILES ALWAYS FORCES A RECOMPILE
Information in this article applies to:
When I include a C file with inline assembly in my project and I configure the IDE to compile, assemble, and link the file I've noticed that that file is ALWAYS compiled and assembled. Why is that?
The Keil C compilers create a list of dependencies as they compile a C file. This information is stored in the .OBJ file.
When you use the µVision IDE to build a project, as it compiles each C file, the IDE looks in the .OBJ file to determine if any of the #include files (or other dependencies) have changed. If they have (or if the .OBJ file does not exist), µVision runs the C compiler.
When you generate a .SRC file from a .C file, all of that dependency information (that is normally saved in the .OBJ file) is not saved anywhere (because no .OBJ file is generated). So, the IDE has no way to determine if the C file should be re-compiled.
Since there are usually only a few .C files that you compile into .SRC files, it shouldn't slow the build process down much. However, there are projects that use a large number of .C files compiled into .SRC files. And, that is where this caveat presents delays.
Your best work-around is to reduce the number of .C -> .SRC files in your project.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Friday, June 16, 2006
of your data.