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

Condition compile output files

Hi there,
Is there a way to have the Keil IDE output different hex and map filenames based on some conditional #if defined(x) like in conditional compilations?

Thanks

Parents Reply Children
  • No, that wasn't what I meant (but I know that it is what you do).

    It is possible to start uVision with command-line arguments to make it rebuild a specified Target in a specified Project, and then exit.

    Thus you can write a batch file with the uVision "calls" to rebuid each Target in turn.

    This means that uVision manages all the dependencies, and you configure your project in the GUI rather than arcance compiler, assemlber, linker, etc, command-lines - if you prefer it that way.

    But it's all still a bodge because uVision is missing a "Rebuild All Targets" facility! :-(

  • This is cool. Maybe Keil can build a "Build All Targets" command? I do have some questions though.

    1. Can I add files to only one target and not the others?

    2. Is there a way to have all the targets show up on the project window so that I can just select the target and build it. Now I have to go to "Manage Componenets", then click on the target name, and the set it as the current target because the project window only shows the active target.

    Thanks
    Andy

  • Ok. Now I have a project with two targets and each target defines a label so that conditional compilation takes place to build two different binaries. Is there a way to put up a message of some sort at the end of a successful build to indicate which target was bulit to ensure that the I did not accidentally messed up the defined label in the target? I know I can probably run a shell script of some sort to compare the file date, but is there an easier way?

    Thanks
    Andy

  • Is there a way to put up a message of some sort at the end of a successful build
    done i my build .bat files

    Erik

  • Good Eric,
    Can you send your script to my hotmail email? User name is swi_n_die

    Thanks
    Andy

  • "1. Can I add files to only one target and not the others?"

    No: You Add files to the Project; however, you can set/clear the 'Include in Target Build' option for individual files and/or Groups on a per-Target basis.

    "2. Is there a way to have all the targets show up on the project window so that I can just select the target and build it."

    No.
    The Project window shows only the current Target - there's a drop-down on the toolbar where you choose the Target.

  • "...conditional compilation takes place to build two different binaries. Is there a way to put up a message of some sort at the end of a successful build to indicate which target was bulit"

    uVision already does this - at the end of the build, the very last message in the 'Build' output window is:

    "<binary-name>" - n Error(s), m Warning(s).