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

How to control external tools with #define directive?

Hi community,

on 'Options for Target' -> Tab 'Output' -> Groupbox 'After Make' -> 'Run User Program #1' and 'Run User Program #2' i can specify to run external tools after compiling and linking. Normally i start a *.BAT commandline batch file.
I am using C51 with µVision 3.

Now, i want to control this mechanism depending on a #define directive in a source code, e.g.:

#define HARDWARE_CONFIG 1


If HARDWARE_CONFIG is defined with value '1', then run batch file 'hw_rev_1.bat', otherwise run 'hw_rev_0.bat'.

Alternatively, is it possible to pass a numeric argument (here the value of HARDWARE_CONFIG) to the batch file?

Has s.o. any suggestions to solve my problem? Thanks in advance,

Martin

0