.ifc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.ifc

595 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Tue Jun 21 05:28:06 MST 2011
I have defined a build variable "Collaudo" as String for conditional compler.
How can i use this variable for conditional code execute ?
I have try with many syntax, but not working

example not working

Byte_Output_1 = 0x0;
[COLOR=Red]#if Collaudo,'Si'[/COLOR]
Fs_Diag = 01;
[COLOR=Red]#endif[/COLOR]
Fs_Inv = 01;
Fs_FCEme = 01;
0 Kudos
Reply
1 Reply

588 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jun 21 06:34:58 MST 2011
Don't know what you are trying to do, but a common solution for Conditional Compiling is defining a symbol:
[INDENT] #define Collaudo
[/INDENT]in your code and use
[INDENT] #ifdef Collaudo
{

}
#else
{

}
#endif
[/INDENT]Or you can define symbols in properties->...->MCU C Compiler->Symbols.

Or you can define this symbol in command line via -DSymbol
0 Kudos
Reply