This section describes some possible ways to customize your projects when working in a cross environment. For more details on the project capabilities, see Project Handling.
When using the project editor to modify the project's properties, two
areas are particularly relevant to cross environments:
Cross environment part of the General page and
Tools, part of the Languages page.
In the Tools section, you will typically need to change the name of
the compiler(s) and the debugger, as well as gnatls' name if you are
using Ada.
For example, assuming you have an Ada project, and using a powerpc VxWorks
configuration. You will set the Ada compiler to
powerpc-wrs-vxworks-gnatmake; Gnatls to
powerpc-wrs-vxworks-gnatls and Debugger to
powerpc-wrs-vxworks-gdb.
If you are using an alternative run time, e.g. a soft float run time,
you need to add the option --RTS=soft-float to the Gnatls
property, e.g: powerpc-wrs-vxworks-gnatls --RTS=soft-float, and
add this same option to the Make switches in the switch editor.
See Switches for more details on the switch editor.
To modify your project to support configurations such as multiple targets, or multiple hosts, you can create scenario variables, and modify the setting of the Tools parameters based on the value of these variables. See Scenarios and Configuration Variables for more information on these variables.
For example, you may want to create a variable called Target to handle
the different kind of targets handled in your project:
Similarly, you may define a Board variable listing the different
boards used in your environment and change the Program host and Protocol
settings accordingly.
In some cases, it is useful to provide a different body file for a given
package (e.g. to handle target specific differences). A possible approach
in this case is to use a configuration variable (e.g. called TARGET),
and specify a different naming scheme for this body file (in the project
properties, Naming tab), based on the value of TARGET.