This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SRC options force 'Always Build'

Three of the 'C' source files in my Project have inline assembler; therefore I have checked the 'Generate SRC' and 'Assemble SRC' options for these files in uVision.

This causes those 3 files to translated every time I build the Project - even when they have not been changed.

The 'Always Build' option is not checked.

How can I make it translate these files only when needed - like it does with all the others?

uVision v2.12
C51 v6.12b
A51 v6.13b
Full, dongled product on WinNT4

  • In case anyone's interested, here's Keil's answer:

    "we know about this. We are working on a solution, but it is not that simple."

    They don't say why it's so hard.

  • They don't say why it's so hard.

    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 uVision2 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 DNE) uVision2 runs the C compiler.

    Now. Here's the problem.

    When you generate a .SRC file from a .C file, all of that dependency information is not saved anywhere (because no .OBJ file is generated). So, the code that finds our what dependencies there are has to be migrated from the C compiler to the uVision2 IDE. And, the IDE has to automatically scan the .C file for .H file and scan the .H files for other .H files and so on.

    Or, we have to provide a way for the end-user to specify fixed dependency information for a source file.

    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.

    So, until we figure out a slever way to solve this problem, your best work-around is to reduce the number of .C -> .SRC files in your project.

    Jon