Preprocessing Using Romimage Conditionals (Windows Embedded CE 6.0)

1/5/2010

You can use Romimage conditional statements to selectively compile source code during the Make Image phase of the build process.

Platform Builder uses these statements to control options in the run-time image and to control variations between similar hardware. For example, you can choose to enable or disable profiling in the run-time image based on the conditional statements that you add to the source files.

The following code example shows the syntax for Romimage conditional statements:

IF <environment variable>[!]
...
ENDIF

Parameters

  • environment variable
    Specifies the variable used in the conditional statement, typically an IMG or BSP environment variable.

Remarks

Note that the IF and ENDIF conditionals don't support the || operator. To create a conditional statement that uses the || operator, use the #if and #endif statements instead. The following code example shows the syntax for a conditional statement that combines two variables using the || operator:

#if defined <environment variable 1> || defined <environment variable 2>
...
#endif

See Also

Reference

Romimage

Concepts

Environment Variables
Build System

Other Resources

Utilities
Binary Image Builder File