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

change output filename after compilation

Hello all,

I would like to change the output filename (*.hex) after compilation automatically, where the name should be defined in a headerfile which is part of the µvision2 project.

Does enybody knows if this is possible??

thanks

Martin

  • I do it all the time, however my method is to use the desired name in the command to oh51. Of course, if you insist on using the IDE you must accept its limitations.

    Please note: I have no problem with the IDE, when used for the simple tasks it is intended for. I just can't see a reason for the desire to make it do what is so darn easy in a .bat environment.

    example:

    c:\tools\keil\c51\bin\oh51 as.omf HEXFILE (..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%%1.hex)

    Erik

  • "I would like to change the output filename (*.hex) after compilation"

    Note that the Hex file is generated after Linking - which comes after compiling.

    Do you want to change just the name, or also the .hex extension?

    "the name should be defined in a headerfile"

    That cannot be done - because header files are used by the compiler, and it's the Linker that sets the final output name.

    "part of the µvision2 project"

    How about just typing it into the 'Name of Executable' box in the Project 'Output' options?

    You could have multiple Targets, each with a different 'Name of Executable'

    Or, just add a RENAME in one of the 'Run User Program' boxes