[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14. Working in a Cross Environment

14.1 Customizing your Projects  
14.2 Debugger Issues  

This chapter explains how to adapt your project and configure GPS when working in a cross environment.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.1 Customizing your Projects

This section describes some possible ways to customize your projects when working in a cross environment. For more details on the project capabilities, see 7. Project Handling.

When using the project editor to modify the project's properties, two areas are particularly relevant to cross environments: Tools and Cross environment, part of the General 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 7.3 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:

Target
Native, Embedded
Target
Native, PowerPC, M68K

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.2 Debugger Issues

This section describes some debugger issues that are specific to cross environments. You will find more information on debugging by reading 11. Debugging.

To connect automatically to the right remote debug agent when starting a debugging session (using the menu Debug->Initialize), be sure to specify the Program host and Protocol project properties, as described in the previous section.

For example, if you are using the Tornado environment, with a target server called target_ppc, set the Protocol to wtx and the Program host to target_ppc.

Once the debugger is initialized, you can also connect to a remote agent by using the menu Debug->Debug->Connect to Board.... This will open a dialog where you can specify the target name (e.g. the name of your board or debug agent) and the communication protocol.

In order to load a new module on the target, you can select the menu Debug->Debug->Load File....

If a module has been loaded on the target and is not known to the current debug session, use the menu Debug->Debug->Add Symbols... to load the symbol tables in the current debugger.

Similarly, if you are running the underlying debugger (gdb) on a remote machine, you can specify the name of this machine by setting the Tools host field of the project properties.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Mail Server on November, 9 2003 using texi2html