| |||
| Home > Working with Projects > Importing an existing CodeWarrior project | |||
This section describes how to import projects created using CodeWarrior for RealView Development Suite, into your workspace.
To import an existing CodeWarrior project:
Export your CodeWarrior project to an eXtensible Markup Language
(XML) format, with a .xml filename extension.
You must create the .xml file in the
same folder as the CodeWarrior project file (with the .mcp filename
extension)
See the RealView Development Suite CodeWarrior IDE Guide for more information on exporting your CodeWarrior project into XML. When you import a CodeWarrior project into the workbench, a new project is created and the relevant tool settings are transferred and applied to the new project.
There are some limitations with the CodeWarrior importer:
Sub-projects are not supported. You must import each project individually.
Sub-targets are imported in the same way as files. See Adding a file to your project for more information.
Command-line options that do not map to those provided in the workbench, are included in the Extras panel for each tool. See Configuring the ARM compilation tools for more information.
Select Import from the File menu.
Select CodeWarrior Project exported as XML from the Import dialog box, see Figure 3.10. Click on Next.
Click Browse... to select
the folder containing the .xml file, see Figure 3.11.
By default, all the projects that can be imported are selected. If the Projects panel shows more than one project, deselect the projects that you do not want to import.
If your source files are located in a folder above the CodeWarrior project root, select the Override XML location option. This enables you to select a different project root, so that the import wizard can mirror the parent structure when creating the new project. The example in Figure 3.12 shows the project folder as the parent structure to use for the new project root.
If you do not use this option, resources outside the project root are linked using absolute paths.
In the Location field, specify the default path to create the new project in your current workspace or click Browse... to select an alternative location. Click Next.
If you select Same location as .xml file, the new project is merged in with the existing CodeWarrior files.
Select the Filter include paths option to minimize the include paths option on the command-line, see Figure 3.13. Only paths containing files ending with the specified extensions are added to the command-line options. Extensions must be given as a comma-separated list. For example: h,inc.
If you do not use this option, all folders in the project are added as explicit includes which can be quite extensive.
The location of linked resources can be specified relative to a path variable, see Figure 3.13. This enables you to share projects containing linked resources without having to mirror the same file structure. If you have not specified any path variables, the Link files relative to variable option is disabled. Click on Finish to create your new project.
To add a new path variable, use the General → Workspace → Linked Resources option in the Preferences dialog box.
When you import a project using a path variable, the wizard automatically updates the C/C++ → CDT build variables option in the Preferences dialog box to correspond with the General → Workspace → Linked Resources option. Both options must be synchronized with each other. If you subsequently move a resource that is linked using a path variable, you must update both options.
The imported project is visible in the Project Explorer view.