The project facility is a key element of the Tornado IDE. It provides graphical and automated mechanisms for creating applications that can be downloaded to VxWorks, for configuring VxWorks with selected features, and for creating applications that can be linked with a VxWorks image and started when the target system boots. The project facility provides mechanisms for:
|
|
|||||||||||||||||||
|
|
WARNING:
Use of the project facility for configuring and building applications is largely independent of the methods used prior to Tornado 2.x. (These methods included manually editing the configuration files config.h or configAll.h, while the project tool uses .cdf files). The project facility provides the recommended and simpler means for configuring and building, although the configuration file method may still be used (see 5. Command Line Configuration and Build). To avoid confusion and errors, the two methods should rarely be used together for the same project.
|
||||||||||||||||||
One exception is for any configuration macro that is not accessible through the project facility GUI (which may be the case, for example, for some BSP driver parameters). You can use a Find Object dialog box to determine if a macro is accessible or not (see Finding VxWorks Components and Configuration Macros). If it is not accessible through the GUI, a configuration file must be edited, and the project facility will implement the change in the subsequent build. |
|||||||||||||||||||
The order of precedence for determining configuration is (in descending order): |
|||||||||||||||||||
A second exception may be building a project based on a BSP. If you have customized your BSP by modifying config.h and other configuration files, you can convert it to a project and combine it with your application in the project facility. See 5.7 Building Projects from a BSP. |
|||||||||||||||||||
In general, changes to header files in the BSP or the BSP makefile are only carried over to projects by recreating the projects. However, changes to .c files are automatically picked up by existing projects. |
|||||||||||||||||||
There are several key terms that you must understand before you can use the project facility documentation effectively:
As its name implies, the Workspace window provides the framework for the project facility. The window displays information about projects files, VxWorks components (if any), and build options in three tabbed views: Files, VxWorks, and Builds (Figure 4-1).
A context-sensitive menu is available in each of the workspace views. A right-mouse click displays the menu. The first section of the menu provides commands relevant to the GUI object you have selected. The second section displays commands relevant to the current page of the window. And the third section displays global commands that are relevant to the entire workspace (Figure 4-2).
Many of the pop-up menu options are also available under the File, Project, and Build menus.
For information about using the Tornado editor, see 3. Editor. For information about using an alternate editor, integrating configuration management tools (such as ClearCase) with the project facility, and other customization options, see 12. Customization.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
If your BSP was included with Tornado 2.2, you can create a bootable project from it directly. Use the project wizard for a bootable application to create a project based on your BSP or the pre-built project (bspName_vx.wpj) which is shipped with every Wind River-supplied BSP.
For information on migrating a Tornado 2.0-compliant BSP to Tornado 2.2, see the Tornado Migration Guide.
If your BSP came from a third party or from Tornado 1.0.1, see the Tornado Migration Guide or the Tornado 2.0 documentation.
You may wish to enable the Tornado 1.0.1 compatibility mode, which exposes menu items to execute BSP builds in a BSP directory. (See 12. Customization.) Once your BSP builds, you may proceed to create a bootable project from it immediately. See 5.7 Building Projects from a BSP.
If you need to create your own BSP, refer to the VxWorks BSP Developer's Guide (a separate product available from Wind River). If you wish to develop the BSP and the application code in parallel, you may wish to begin application development on the VxWorks simulator. See Using the Simulator BSP.
If you already have a custom BSP that is Tornado 2.0 compliant, see the Tornado Migration Guide for information on migrating from 2.0 to 2.2.
If you already have a custom BSP but it is not Tornado 2.0 compliant, you will need to modify it to conform to the guidelines outlined in the VxWorks BSP Developer's Guide in order to use it with the Tornado project facility. Once you have modified it, verify that it builds properly before creating a project for it.
|
|
|||||||||||||||||||
You may still use a non-compliant BSP by managing its customization and configuration manually. For information on using manual methods, see 5. Command Line Configuration and Build. You can still create downloadable projects to hold your application code and download them to a target booted with a non-compliant BSP.
You can use the target simulator if you want to develop the BSP and application code for your product in parallel, or if your target hardware is not yet ready. The integrated simulator contains default VxWorks functionality sufficient for supporting many applications. It does not have networking support; for this you can use the full simulator (VxSim), which is available as an optional product.
If you are using the integrated simulator and do not need to customize it by adding or removing VxWorks functionality, you need not create a bootable project until you have your production BSP ready.
If you need additional VxWorks functionality, you will need to create a bootable project immediately. Use the project wizard for a bootable application. You will use a different base depending on what additional functionality you need.
The process for creating a project, and configuring it, is identical for both the integrated and full simulator.
Base this project on the simulator BSP (either the integrated simulator or the optional product), or the pre-built, default simulator project (simhost_vx.wpj. At this point, your project will build an image identical to the integrated simulator as you received it from Wind River. Now add any components you need using the VxWorks tab in the Workspace view (see 4.4.3 Configuring VxWorks Components).
Use size information to make sure your image will fit in your target memory space. The approximate image size information displayed in the Component Add Dialog reports the size of the VxWorks code in your configuration and the increase or decrease resulting from adding or removing components. This size will be smaller than your actual image size, as it does not reflect your BSP support code or any application code you will be adding.
If you already have a working application, or if your application is very large, you may want to use your own build system. You can use the project facility to link the output of an external build into VxWorks and even start external builds (see External Build System).
Alternatively, you may want to use the project facility to configure your VxWorks image and produce a makefile. You can build your application outside Tornado and call the project facility-generated makefile from your build to produce a final image.
Use this approach if your edit-compile-reboot cycle is relatively quick. Add the files to the bootable project using the Add File(s) to Project context menu available in the File tab of the Workspace view. Then edit the VxWorks initialization file, usrAppInit.c, adding calls to your application's initialization and startup routines. The VxWorks application initialization component is required, and is included by default. See 4.4 Creating a Custom VxWorks Image and 4.5 Creating a Bootable Application.
Use this method if rebooting your target is inconvenient, and if your code is modular enough that it can be added to the running target without interrupting execution or if you have the means to start and stop your application. Create a downloadable project using the Downloadable Project Wizard. Add application files with the Add File(s) to Project context menu. Build your downloadable project. Boot the target using the appropriate image described in 4.2.2 Creating a Bootable Project Based on a BSP. Download the partially linked and munched .out file produced by your project.2 See 4.3 Creating a Downloadable Application.
This ensures that the custom rule will be invoked only to process the specified source file. For example, you may wish to add a custom rule to process a yacc file into a C source file. To create a custom rule, see 4.6 Working With Build Specifications.
|
|
|||||||||||||||||||
A build-specific custom rule can invoke any command and reference any build dependencies. The rule can be selected as the current build rule to build the desired output explicitly or, if the Invoke this rule before building Project box is checked, it will be built implicitly prior to building any of the built-in rules (such as vxWorks, or project.a) for the project.
|
|
NOTE:
Custom build rules cannot be copied between projects. If you will use either form of custom build rules, and know that you will be migrating files between projects, you may wish to put files with similar build settings into separate projects. These projects can then be built and linked together. For more information, see the hierarchical sub-project model discussed in Sub-Projects.
|
||||||||||||||||||
You may migrate application source files between any two projects that coexist in the same workspace. Use the Add File(s) from Project context menu from the File tab. If you have defined custom build rules for any of your source files, you will have to replicate them in the destination project by hand.
|
|
|||||||||||||||||||
If you have a number of files that must be built with special build rules or flags, it may be easier to create a new project to build these particular files, and then build that project as a sub-project of your main project. For more information, see Structuring Your Projects.
Tornado provides configuration management integration. To enable and configure it, see 12. Customization.
VxWorks must be configured to support the calls your application makes to it, or you will not be able to link your image. If your BSP provides a "bare-bones" VxWorks configuration, you may wish to use Project>Auto Scale to detect and add most of the VxWorks functionality you require. Auto Scale will compile your code, analyze the symbols in your object modules, map them to components, and offer to include those components. There may be some components that Auto Scale does not detect. If you Auto Scale, build, and still get link errors, you will need to add the additional components from the workspace VxWorks tab. For information on using Auto Scale, see 4.5.1 Using Automated Scaling of VxWorks.
Add all your application source code to one bootable project. This method is the simplest. All your source code is added to the bootable project, which already contains the BSP code and is linked to the VxWorks libraries.
The Tornado workspace is very convenient for configuring VxWorks, building small applications, or building, downloading, and debugging small parts of a large application. It is not designed to handle a complete build of a large, modular application, which often requires sub-projects (though this can be achieved using custom rules and macros). For this reason, you may want to use an external build system to build your application, then link it to VxWorks using the EXTRA_MODULES or LIBS macros. You can write a custom rule to invoke your external build process; see Sub-Projects. Alternatively, your build can kick off a VxWorks build and link your application code as the final step.
Sub-projects allow you to create as many projects as are needed to hierarchically organize and build your product. This approach accommodates existing hierarchically-organized source code. You will want to use this approach if:
Tornado has only limited support for managing and building these hierarchical sub-projects. You must use macros and custom rules to create the hierarchy and structure the builds manually. For directions on how to organize your application code into sub-projects, please refer to Example 1, below.
This example illustrates how a master project can be used to build several sub-projects. The master project builds the sub-projects as .pl (partially linked) modules. Then they are linked with the master project and munched (integrated with code to call C++ static constructors and destructors) in the final build step.
In this example, the master project is a bootable project, and there are two sub-projects that are downloadable projects. However, a downloadable project can also serve as a master project. You could use this approach if you wanted to build several downloadable sub-projects and link them into a single downloadable project. You could also use this approach to integrate an external application build into VxWorks. You need to modify the custom rules in the example to invoke your external build (for example, using make).
Go first to the Build tab. Expand the project Master. Double-click on the build specification default to display the build property sheet. In the build property sheet, select the Rules page. Click New/Edit and add the new rules.
You enter a new rule by filling in the Target, Dependencies, and Commands fields of the Create or Edit Rule dialog box. For example, to add the clean rule, you type clean in the Target field, CleanProject1 CleanProject2 vxWorks in the Dependencies field, and nothing in the Commands field. For each rule, you must also uncheck the Invoke this rule before building project checkbox.
The required rules are listed below in makefile syntax. The first example shows the syntax. Fill in the appropriate boxes for each rule.
SYNTAX:
target : dependencies
commands
RULES:
../../Project1/SIMNTgnu :
- mkdir $@
Master : ../../Project1/SIMNTgnu/Project1.pl ../../Project2/SIMNTgnu/Project2.pl VxWorks
../../Project1/SIMNTgnu/Project1.pl : ../../Project1/SIMNTgnu
wind_force_make
$(MAKE) -C ../../Project1/SIMNTgnu -f ../../Project1/Makefile
BUILD_SPEC=SIMNTgnu Project1.pl
../../Project2/SIMNTgnu :
- mkdir $@
../../Project2/SIMNTgnu/Project2.pl : ../../Project2/SIMNTgnu
wind_force_make
$(MAKE) -C ../../Project2/SIMNTgnu -f ../../Project2/Makefile
BUILD_SPEC=SIMNTgnu Project2.pl
CleanProject1 : ../../Project1/SIMNTgnu
$(MAKE) -C ../../Project1/SIMNTgnu -f ../../Project1/Makefile
BUILD_SPEC=SIMNTgnu clean
CleanProject2 : ../../Project2/SIMNTgnu
$(MAKE) -C ../../Project2/SIMNTgnu -f ../../Project2/Makefile
BUILD_SPEC=SIMNTgnu clean
clean : CleanProject1 CleanProject2
|
|
|||||||||||||||||||
If you wish your rules to be portable between architectures, substitute $(CPU)$(TOOL) for SMNTgnu.
In the Rules pane, set the default build rule for project Master to be the rule Master. Next, in the Build pane, in the MACROS tab for project Master, append to the EXTRA_MODULES macro "../../Project1/SIMNTgnu/Project1.pl" and "../../Project2/SIMNTgnu/Project2.pl" and click the Add/Set button.
|
|
|||||||||||||||||||
Add to the source file usrAppInit.c, in project Master, a function prototype for, and a call to, the function Test( ):
void Test(void);
void usrAppInit (void)
{
#ifdef USER_FF
USER_APPL_INIT; /* for backwards compatibility */
#endif
/* add application specific code here */
Test();
}
When you build Master, all three will be built, munched, and linked into one bootable image. (For information on munching, see the VxWorks Programmer's Guide: C++ Development.)
|
|
|||||||||||||||||||
Example 4-2: Avoiding Absolute Paths
One problem that arises from using a version control system is that different users may extract projects and source files to different locations (for example, in Visual SourceSafe, or CVS), or map views to different drive letters (Clearcase on Windows). It helps greatly if projects do not have any absolute paths written into them.
If source files or subprojects are in a directory which is at the same directory level as the parent project directory or deeper, they are recorded in the parent project file with a path relative to the parent project directory. Organizing your source files and projects in this way is recommended to avoid absolute paths in project files and makefiles.
If you cannot organize your source files and projects in this way, we provide two environment variables to allow you to define the root of your source directory tree or your project directory tree: WIND_SOURCE_BASE and WIND_PROJ_BASE.
Below we give some examples showing how to avoid absolute paths to source files or to sub-projects.
Suppose your project is in directory t:\source_root\myproj and your source files are organized as follows:
t:\source_root\myproj\foo1.c t:\source_root\src\foo2.c t:\source_root\myproj\src\foo3.c
Your project will contain no absolute paths. Instead, the above files will be recorded in the project file as:
$(PRJ_DIR)/foo1.c $(PRJ_DIR)/../src/foo2.c $(PRJ_DIR)/src/foo3.c
Organizing your source files and projects in any of these ways is the recommended procedure for avoiding absolute paths in project files and makefiles.
If you cannot organize your source files and projects in one of these ways, the WIND_SOURCE_BASE environment variable allows you to define the root of your source directory tree. To illustrate the use of WIND_SOURCE_BASE, assume you wish to add the file:
t:\other_source_root\goo.c
If WIND_SOURCE_BASE is not defined, it appears in the project file with an absolute path (we do not support $(PRJ_DIR)/../../). However, before you add the file, you can use Tools->Options->Workspace to define:
WIND_SOURCE_BASE = t:\other_source_root
Then t:\other_source_roo\goo.c is recorded in the project file as:
$(WIND_SOURCE_BASE)/goo.c
The major drawback to the WIND_SOURCE_BASE variable is that all users of myproj must have WIND_SOURCE_BASE defined or the workspace cannot find goo.c.
This example refers to a master project called master and various sub projects called sub1, sub2,... The master project could be a bootable project and the sub-projects could refer to external build systems or downloadable projects.
Assume the master project is in directory t:\prj_root\master and your sub-projects are organized as follows:
t:\prj_root\sub1 t:\prj_root\master\sub2 t:\prj_root\subprojects\sub3 t:\prj_root\master\subprojects\sub4
In this case, your master project will contain no absolute paths. Instead, the above directories will be recorded in the master project file as:
$(PRJ_DIR)/../sub1 $(PRJ_DIR)/sub2 $(PRJ_DIR)/../subprojects/sub3 $(PRJ_DIR)/subprojects/sub4
Organizing your projects in any of the above ways is the recommended procedure for avoiding absolute paths in project files and makefiles.
If you cannot organize your projects in any of these ways, we provide the WIND_PROJ_BASE environment variable to allow you to define the root of your project directory tree. To illustrate the use of WIND_PROJ_BASE, assume you wish to add the project:
t:\other_prj_root\sub5
If WIND_PROJ_BASE is not defined, then it appears in the master project file with an absolute path (we do not support $(PRJ_DIR)/../../). However, before you add the project you could use Tools->Options->Workspace to define:
WIND_PROJ_BASE=t:\other_prj_root
Now when you add t:\other_prj_root\sub5, this sub-project will be recorded in the master project file as:
$(WIND_PROJ_BASE)/sub5
The major drawback to the WIND_PROJ_BASE variable is that all users of the master project have to define WIND_PROJ_BASE, or the workspace is unable to find sub5.
A downloadable application is a collection of relocateable object modules that can be downloaded and dynamically linked to VxWorks, and started from the shell or debugger. A downloadable application can consist of a single "hello world" routine or a complex application.
All work that you do with the project facility, whether a downloadable application, a customized version of VxWorks, or a bootable application, takes place in the context of a project.
If the Create Project window is open (the default when you first start Tornado3 ), click the New tab. Otherwise, click File>New Project. Then choose the selection for a downloadable application, and click OK (Figure 4-3)
The application wizard appears. This wizard is a tool that guides you through the steps of creating a new project.
First, enter the full directory path and name of the directory you want to use for the project (only one project is allowed in a directory), and enter the project name. It is usually most convenient to use the same name for the directory and project, but it is not required.
|
|
|||||||||||||||||||
You may also enter a description of the project, which will later appear in the property sheet for the project (Figure 4-4). Finally, identify the workspace in which the project should be created. Click Next to continue.
Identify the toolchain with which the downloadable application will be built. You can do so by referencing an existing project, or by identifying a toolchain. Basing a project on an existing one means that the new project will reference the same source files and build specifications as the one on which it was based. Once the new project has been created, its build specifications can be modified without affecting the original project, but changes to any shared source files will be reflected in both.
For example, to create a project that will run on the target simulator, select A toolchain and select the default option for the target simulator from the drop-down list (Figure 4-5).4 Click Next.
The wizard confirms your selections (Figure 4-6). Click Finish.
The Workspace window appears, containing a folder for the project. Note that the window title includes the name of the workspace (Figure 4-7).
|
|
|||||||||||||||||||
The project facility generates a set of files whose contents are based on your selection of project type, toolchain, build options, and build configurations. During typical use of the project facility you need not be concerned with these files, except to avoid accidental deletion, to check them in or out of a source management system, or to share your projects or workspaces with others. The files are created in the directories you identify for the workspace and project. The files initially created are:
Both of these files contain information that changes as you modify your project, and add projects to, or delete projects from, the workspace.
When you build your application, a makefile is dynamically generated in the main project directory, and a subdirectory is created containing the objects produced by the build. The subdirectory is named after the selected build specification. If other build specifications are created and used for other builds, parallel directories are created for their objects.
The Files view of the Workspace window displays information about the projects, and the directories and files that make up a project (Figure 4-8).
Initially, there are only the default folders for Built Objects and External Dependencies, and the projectName.out file. The file projectName.out is created as a single, partially-linked module when the project is built. It comprises all of the individual object modules in a project for a downloadable application, and provides for downloading them all to the target simultaneously.
To create a new file, click File>New, or press CTRL+N. Select the file type from the New dialog box. Then select the project to which the file should be added. Finally, enter the file name and directory, and click OK (Figure 4-9). The editor window opens, and you can write your code and save the file. (See 3. Editor).
Add existing files to a project by right-clicking in the Workspace window, selecting Add Files or Add Files from project from the pop-up menu, and then using the associated dialog box to locate and select the file(s).
To link object files with your project, use the PRJ_LIBS macro or the Linker page of the build specification property sheet (see Linker Options). To link library (archive) files with your project, add the libraries to the list defined by the LIBS macro in the Macros page of the build specification property sheet (see Makefile Macros).
Remove files from the project by right-clicking on the file name and selecting Remove from the pop-up menu, or by selecting the file name and pressing DELETE.
To display information about the properties of a file, right-click on the file name in the Workspace window, and select Properties from the pop-up menu. The extent of information displayed depends on the type of file and whether or not make dependencies have been generated. In the case of source code, a Properties sheet for the file appears, displaying information about make dependencies; general file attributes such as modification date; and the associated make target, custom dependencies, and commands used for the build process (Figure 4-10).
See Calculating Makefile Dependencies, for information about how and when to calculate makefile dependencies. See Compiler Options for information about overriding default compiler options for individual files.
The File and pop-up menus provide options for opening, saving, and closing files. You can also use standard Windows key and mouse shortcuts (such as double-clicking on a file name to open the file in the editor, using CTRL+S to save a file, and so on).
See 12. Customization for information about customizing the editor, including how it handles DOS and UNIX end-of-line markers.
The project facility uses the GNU make utility to automate compiling and linking an application.5 It automatically creates a makefile prior to building the project. But before it can create a makefile, the makefile dependencies must be calculated. The calculation process, which is based on the project files' preprocessor #include statements, is also an automated feature of the project facility.
Binaries produced by a given build are created in a project subdirectory with the same name as the name of the build specification (projectName\buildName).
|
|
NOTE:
All source files in a project are built using a single build specification (which includes a specific set of makefile, compiler, and linker options) at a time. If some of your source requires a different build specification from the rest, you can create a new project for it in the same workspace, and customize the build specification for those files. One project's build specification can then be modified to link in the output from the other project. See Sub-Projects.
|
||||||||||||||||||
|
|
NOTE:
The project facility allows you to create specifications for different types of builds, to modify the options for any one build, and to select the build specification you want to use at any given time easily. See 4.6 Working With Build Specifications.
|
||||||||||||||||||
|
|
|||||||||||||||||||
To calculate makefile dependencies, select Dependencies from the workspace pop-up menu. The Dependencies dialog box appears (Figure 4-11). Click OK.
After dependencies have been calculated, the files are listed in the External Dependencies folder (Figure 4-12).
If you do not calculate dependencies before you start a build, Tornado prompts you to do so for any of the project files for which dependencies have not previously been calculated. Dependencies are not calculated for each build specification. If your dependencies change for different build specifications (for example, if they are CPU-dependent), then you may want to:
Tornado assumes that your header files are in either your project directory or installDir\target\h. If you have placed files in other locations, you need to make two changes to your project build specification. Right-click on the name of your build specification (for example, SIMNTgnu). Select Properties from the pop-up menu. On the C/C++ compiler tab, click the Include paths button. Add a separate entry for each directory path.
The Advanced option allows you to speed up the build process by specifying paths in which none of the dependencies could have changed since the last build. The timestamps for the files in the specified paths are not checked (Figure 4-13).
Each build specification for a downloadable application consists of a set of options for makefile rules and macros, as well as for the compiler, assembler, and linker. A default build specification is defined when you create your project. To display its property sheet, double-click on the build specification name in the Builds view of the workspace to display the property sheet for the build specification.
The Rules page (Figure 4-14) allows you to select from the following build target options:
You can use the project facility to change the options for a given build specification, create and save new build specifications, and select the specification to use for a build. You can, for example, create one build specification for your project that includes debug information, and another that does not. For more information, see 4.6 Working With Build Specifications.
|
|
|||||||||||||||||||
The Macros tab contains pre-set build macros. Do not delete the pre-existing macros; while you can reenter them, the value will be lost. You can add and delete your own macros by typing in the Name window and then clicking the Add button.
|
|
|||||||||||||||||||
To build a project with the default options, select the name of the project (or any subordinate object in its folder) and then select Build 'projectName.out' from the pop-up menu. If you have created build specifications in addition to the default, you can select the build specification you want to use from the Build drop-down list at the top of the workspace window before you start the build.
The Build Output window displays build messages, including errors and warnings (Figure 4-15).
Any compiler errors or warnings include the name of the file, the line number, and the text of the error or warning text. Double-clicking on the line containing the error message opens the file in the editor with a context pointer on the offending line. The error or warning text is also displayed in the status bar at the bottom of the main Tornado window.
Use the Edit>Next Error/Tag and Edit>Previous Error/Tag menu options to navigate between errors when you are using the Tornado editor.
|
|
WARNING:
The default compiler options include debugging information. Using debugging information with the optimization set to anything but zero may produce unexpected results. See 4.6 Working With Build Specifications for information about modifying builds and creating new build specifications.
|
||||||||||||||||||
The Build toolbar provides quick access to build commands. Display of the toolbar is controlled with the View>Toolbar>Build Toolbar menu option. The toolbar is shown free-floating in Figure 4-16, but is docked by default.
The Build toolbar commands (Table 4-2) are also available from the main menus and the Workspace pop-up menu.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
Before you can download and run an application, you must boot VxWorks on the target system, have access to a Tornado registry, and configure and start a target server. For more information, see 2. Setup and Startup and 8. Target Server.
You can download an entire project from the project workspace by selecting Download 'projectName.out' from the pop-up menu for the Files view, or by using the download button on the Build toolbar. You can download individual object modules by selecting the file name and then selecting the Download 'filename.o' option from the pop-up menu. However, you may inadvertently introduce errors by downloading individual object modules out of sequence. We strongly recommend that you always download the partially-linked projectName.out file.
C++ projects must be downloaded as projectName.out because this file is produced from application files and munched for proper static constructor initialization.
To run a downloaded application, use WindSh or CrossWind. For more information see 7. Shell or 10. Debugger.
To unload a project from the target, use the Unload 'projectName.out' option on the pop-up menu.
New projects can be added to a workspace by selecting File>New Project and creating a new project when the workspace is open.
Existing projects can be added to a workspace by selecting the menu options File>Add Project to Workspace, and using the file browser to select a project file (projectName.wpj).
Projects can be removed from a workspace by selecting the project name in the Files view, and then selecting the Remove option from the pop-up menu, or by selecting the project name and pressing DELETE.
|
|
|||||||||||||||||||
The Tornado distribution includes a VxWorks system image for each target shipped. The system image is a binary module that can be booted and run on a target system. The system image consists of all desired system object modules linked together into a single non-relocateable object module with no unresolved external references. In most cases, you will find the supplied system image adequate for initial development. However, later in the cycle you may want to create a custom VxWorks image.
VxWorks is a flexible, scalable operating system with numerous facilities that can be tuned, and included or excluded, depending on the requirements of your application and the stage of the development cycle. For example, various networking and file system components may be required for one application and not another, and the project facility provides a simple means for either including them in, or excluding them from, a VxWorks application. In addition, it may be useful to build VxWorks with various target tools during development (such as the target-resident shell), and then exclude them from the production application.
Once you create a customized VxWorks, you can boot your target with it and then download and run applications. You can also create a bootable application simply by linking your application to VxWorks and adding application startup calls to the VxWorks system initialization routines (see 4.5 Creating a Bootable Application).
All work that you do with the project facility, whether a downloadable application, a customized version of VxWorks, or a bootable application, takes place in the context of a project.
If the Create Project window is open (the default when you first start Tornado6 ), click the New tab. Otherwise, click File>New Project. Then choose the selection for a bootable application, and click OK (Figure 4-17)
The application wizard appears (Figure 4-18). This wizard is a tool that guides you through the steps of creating a new project.
First, enter the full directory path and name of the directory you want to use for the project (only one project is allowed in a directory), and enter the project name. It is usually most convenient to use the same name for the directory and project, but it is not required.
|
|
|||||||||||||||||||
Then you identify the BSP with which you will build the project. You can do so by referring to an existing project, or by identifying a BSP that you have installed.
Basing a project on an existing one means that the new project will reference the same source files as the one on which it was based, but it will start with copies of the original project's VxWorks configuration and build specifications. The build specifications and VxWorks configuration for the new project can be modified without affecting the original project, but changes to any shared source files will be reflected in both.
For example, to create a project for a module that will run on a mbx860 target, select An existing project and then select mbx860_gnu.wpj (or mbx860_diab.wpj if you have purchased the Diab tools) from the drop-down list (Figure 4-19). Click