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

reusing the same file in different targets (or: a rant)

Hello,
Why does uv3 not allow me to add the file "foo.h" to different targets? or maybe I am missing something? I am actually trying to add the same file twice to different targets. the fact that I get an error is highly annoying as I want to place common data of an application and bootloader in a share include file, and use the same project file but with different targets.

Parents
  • "You wouldn't compile that anyway!"

    Conventionally, no - but there's nothing in principle to stop you from compiling a file that happens to have ".h" as its extension...

    Early Triscend tools produced a header that you had to compile once and also include in your other source files:

    When compiled, it created the initialisation code;

    When included, it had to be done like this:

    #define  PROTOTYPE_ONLY
    #include <triscend.h>
    #undef   PROTOTYPE_ONLY
    

    and, as the name suggests, that would cause it to just create Prototypes for the functions...

Reply
  • "You wouldn't compile that anyway!"

    Conventionally, no - but there's nothing in principle to stop you from compiling a file that happens to have ".h" as its extension...

    Early Triscend tools produced a header that you had to compile once and also include in your other source files:

    When compiled, it created the initialisation code;

    When included, it had to be done like this:

    #define  PROTOTYPE_ONLY
    #include <triscend.h>
    #undef   PROTOTYPE_ONLY
    

    and, as the name suggests, that would cause it to just create Prototypes for the functions...

Children