Keil Logo


Information in this article applies to:

  • C166 Version 4.12
  • C251 Version 3.11
  • C51 Version 6.12
  • µVision Version 2.12


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

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.