Presentation is loading. Please wait.

Presentation is loading. Please wait.

® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications.

Similar presentations


Presentation on theme: "® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications."— Presentation transcript:

1 ® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications

2 ® 2-3 Projects and Workspaces Tornado uses projects and workspaces to manage user code, configure VxWorks, and specify build settings. A project is a collection of source and binary files and build specifications. A workspace is a collection of projects which are grouped to simplify organization of multiple related projects. The project facility is started Project –[UNIX] by selecting the Project button from the Tornado launcher. New Project...File –[Windows] automatically when Tornado starts up, or later by selecting New Project... from the File menu.

3 ® 2-4 Creating a New Project The tabs on the selection window allow you to: Recent –(Recent) Open a recently visited workspace. New –(New) Create a new bootable or downloadable application. Existing –(Existing) Browse for and enter an existing workspace.

4 ® 2-5 Project Facility Terminology Key project facility concepts: –Bootable Project - A project used to configure and build VxWorks images for a particular BSP. Application code may be statically linked to such a VxWorks image, and the application’s start-up code may be specified. –Downloadable Project - A project used to manage and build application modules which can be downloaded and dynamically linked with a running VxWorks image. Allows "on the fly" development. –Component - A scalable VxWorks facility, often with an initialization routine. Example: hardware fpp support. –Toolchain - A collection of development tools (compiler, linker, assembler, etc.) for a specific target CPU. –Build specification - User-specified settings and rules which are used to build a project.

5 ® 2-6 Workspace Window Workspace tabs display: Files Files -- Project source and object files. VxWorks VxWorks -- Included and excluded VxWorks components. Builds Builds -- Build specifications.

6 ® 2-7 Context Menu Actions related to selection usrAppInit.c (usrAppInit.c) Menu items vary with selection. Actions related to current networkServer project (networkServer) Properties of the selected item (usrAppInit.c). Right-click with mouse to invoke context menu.

7 ® 2-8 Project Files In addition to the source, object, and header files that are displayed in the Files pane of the workspace window, the project facility creates other files: wpj projectName.wpj -- The project master file. Specifies –files included in the project and their dependencies –build specifications –custom rules –VxWorks configuration data (for bootable projects). wsp workspaceName.wsp -- Workspace master file. Lists the projects belonging to the workspace. Makefile Makefile -- Generated before a new or modified project is built or saved.

8 ® 2-9 Using Version Control with Projects The project facility can make use of source management tools. The context menu for a selected source or header file will allow the file to be checked in or checked out. Tools -> Options... -> Version Control Tools -> Options... -> Version Control allows configuration of check-in and check-out routines:

9 ® 2-10 Projects Projects Overview 2.2Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications

10 ® 2-11 Bootable Projects and Applications A bootable project configures and builds VxWorks images for a BSP. Application code may be statically linked with, or built as part of, a bootable project, to create a bootable application. Typical reasons to create a bootable project: –To create a production version of a product (discussed in the Reconfiguration chapter) –To configure a custom VxWorks image A bootable project is based on an installed BSP (or derived project), or an existing VxWorks project. File -> New Project... Create a bootable project by selecting File -> New Project... and using the project wizard.

11 ® 2-12 Creating a Bootable Project (Part I) Choose a project name, project directory, a comment string, and a workspace to add the project to. By convention, the project directory name should match the project name (not required, however).

12 ® 2-13 Creating a Bootable Project (Part II) A bootable VxWorks image is based on: –An existing project (possibly a projectized BSP), or.../target/config –An installed BSP (found in.../target/config/bspName).

13 ® 2-14 Creating a Bootable Project (Part III) The last wizard screen confirms your choices of workspace, project name, and basis BSP (or projectized BSP). Finish Hit Finish button to create your project.

14 ® 2-15 Bootable Project Files A bootable project is created with the following files: linkSyms.c and prjConfig.c -- dynamically generated configuration files containing component initialization and scaling support. romInit.s, sysALib.s, and sysLib.c; romStart.c -- BSP or generic startup files (see Reconfiguration chapter). usrAppInit.c -- initializes statically linked user application (see Reconfiguration chapter). Created as a stub file, modified by user. prjComps.h and prjParams.h -- dynamically generated header files containing component choices and parameter values.

15 ® 2-16 VxWorks Components VxWorks facilities are shown in a heirarchical display in VxWorks the VxWorks pane. Included components are shown in bold, excluded in plain text, and unavailable ones in italics. Note that the context menu allows you to include or exclude components.

16 ® 2-17 Including Components When component is included, dialog box lists size of component as well as dependent components. OK Selecting OK button will include facility and dependent components.

17 ® 2-18 Component Selections

18 ® 2-19 Fixing Component Errors and Conflicts If the configuration you have generated contains errors or conflicts, the path to the improper components is highlighted.

19 ® 2-20 Component Parameters Some components require parameter values. Double- click on component to set these parameters.

20 ® 2-21 Configuration Outside the Project Facility Some VxWorks components require configuration outside of the project facility, usually because of their complexity. Examples:.../target/config/comps/src/net/usrNetDhcpsCfg.c –DHCP server component -- DHCP lease table is configured in.../target/config/comps/src/net/usrNetDhcpsCfg.c. (For details, see Networking chapter.).../target/configsysScsi.c –SCSI peripheral configuration is configured in either.../target/config/bspName/sysScsi.c (preferred) or.../target/config/comps/src/usrScsi.c. (Details in SCSI Configuration appendix.) See help pages on component for configuration issues.

21 ® 2-22 Building VxWorks The build toolbar, shown above, allows you to build a downloadable object or boot image. The resulting image is saved in the directory projDir/buildSpecName/. Change your boot parameters to reflect this path. Output from the compilation goes to a build window. Windows users can go to any source line generating a build error or warning by double-clicking on the relevant output line. Download object Build project file or image Rebuild AllStop build Compile selected Update source file dependencies

22 ® 2-23 Projects Projects Overview Bootable Projects and VxWorks Configuration 2.3Integrated Simulator Downloadable Projects Build Specifications

23 ® 2-24 Tornado Integrated Simulator Tornado includes an integrated target simulator. This facility allows application development prior to hardware availability. The simulator offers support for all VxWorks facilities except: –Hardware-specific facilities –Networking support Tornado includes a version of WindView which works with the simulator. (See Windview chapter.) Only one simulator session can run at a time per host.

24 ® 2-25 Simulator Basics The integrated simulator is a "BSP" for the host OS. VxWorks runs as a process under the host OS. Hardware interrupts are simulated using signals (UNIX) or Windows messages (Windows).

25 ® 2-26 Starting a Simulator Session Create a simulator by: –Pressing the simulator button (Windows hosts) –Pressing the VxSim button from the launcher (UNIX hosts). You are asked if you wish to launch: (.../target/config/vxWorksexe –A standard simulator image (.../target/config/simBSPName/vxWorks[.exe]), or –A custom-configured image from a project directory. Windows users will then be given a choice to create a default target server. UNIX users need to configure a target server. Tools can be attached to this target server.

26 ® 2-27 Projects Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator 2.4Cross Development and Downloadable Projects Build Specifications

27 ® 2-28 Cross-Development Overview Add application source files to project. Link modules with VxWorks image and load into target address space: –Static linking integrates application modules into the VxWorks image (a bootable project) when it is built. VxWorks is then loaded onto the target at boot time. –Dynamic linking integrates a project object file (in a downloadable project) into the VxWorks image on the target when the file loads, after VxWorks is already running. Static linking (bootable projects) is usually used for production code. Dynamic linking (downloadable projects) is usually used during development.

28 ® 2-29 Creating a Downloadable Project (Part I) Choose a project name, project directory, a comment string, and a workspace to add the project to.

29 ® 2-30 Creating a Downloadable Project (Part II) A downloadable project is based on: –A toolchain (CPU architecture dependent), or –An existing project.

30 ® 2-31 Creating a Downloadable Project (Part III) Finish The project wizard confirms your choice of project name, directory, and toolchain. Press Finish to create your project.

31 ® 2-32 Adding demo.c to Our Project Add a file to a downloadable project by: –Project -> Add/Include -> File –Project -> Add/Include -> File menu item, or –Add Files... –Add Files... item in context menu, File -> New... –When creating a new source file using File -> New... The newly added file will be displayed in the Files pane of the workspace window. In addition, if the added file was a C/C++ source file, file.o will appear in the Object Modules folder.

32 ® 2-33 demo.c

33 ® 2-34 Building A Project Build A downloadable application can be built using the build toolbar, the context menu, or the Build menu. The default target produced by the build is projName.out. This build compiles and links your project files, then munches the result. vxWorks projName.out is not an executable; it is an object module which will be downloaded and dynamically linked to vxWorks. Dependencies... Make dependencies will be automatically generated the first time a project is built. If dependencies change at a future time, select the Dependencies... item from the context menu to recalculate them.

34 ® 2-35 Unresolved External References

35 ® 2-36 Downloading the Project File Use the context menu to download projName.out after selecting the appropriate target server. Loads projName.out into the target server’s memory pool on the target. Tools -> Options...-> Download Adds only global symbols to host-resident symbol table (default). Other load options can be set using Tools -> Options...-> Download. Resolves undefined symbols as module is loaded. If any unknown symbols are encountered, then a warning is issued. However, the load does not "fail," in that the module is present on target. Unloads old version of module if it exists.

36 ® 2-37 Showing Modules Downloaded project modules can be displayed from the browser by: Module Information –Selecting Module Information and the proper module (Windows). –Clicking on module name (UNIX).

37 ® 2-38 Unloading Modules Modules can be unloaded using the context menu Unload ‘filename’ item. –Frees target memory occupied by text, data and bss segments. –Removes symbols defined by this module from the symbol table. Used if board does not have enough memory to hold code for all projects. Make sure that no tasks are executing functions which could reference the module you are unloading. If other loaded modules reference symbols defined by the code you are unloading, unload them as well.

38 ® 2-39 Projects Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects 2.5Build Specifications

39 ® 2-40 Build Settings A build specification selects toolchain programs (compiler, linker, assembler,...) and the flags for each; it also specifies makefile macros and the default rule used in building your project. A project can have several build specifications. For example, a production spec and a debug spec; or build specs for different target architectures (downloadable projects only). Builds To access the build specifications for your project, select the Builds tab in the workspace window.

40 ® 2-41 Build Specification Property Sheet Double clicking on a project’s build spec icon brings up the specification’s property sheet, where you can change build settings.

41 ® 2-42 Compiler Settings The C/C++ compiler pane allows you to set compiler flags.

42 ® 2-43 Rule Definitions

43 ® 2-44 Build Specification Notes You can build a project using any build specification defined for that project. Set the active build spec for the selected project using the Build Spec drop-down list at the top of the project workspace. Files A folder containing object files for the project’s active build spec, labeled with the build spec name, is shown in the workspace Files pane. Rebuild All... Caveat: If you edit a build spec without touching any project source files, you must Rebuild All... to see the new specification used.

44 ® 2-45 Summary The Project Wizard allows you to create –downloadable Projects –bootable Projects The project workspace window allows access to: –project files –build specifications –VxWorks configuration (bootable projects) A bootable project can be created to: – build a custom-configured VxWorks image –statically link application code to VxWorks (Reconfiguration chapter)

45 ® 2-46 Summary VxWorks configuration –Components can be included or excluded –Dependencies determined and reported to you –Selections indicate a choice among component versions. –Component parameters can be set vxWorks Custom VxWorks image built in.../projDir/buildSpecName/vxWorks (or imageName) Tornado includes an integrated simulator that runs on host OS. Allows development of software prior to hardware availability.

46 ® 2-47 Summary Downloadable projects speed up cross-development –Object code dynamically linked to running VxWorks image. –Old version unloaded –Download uses host-based symbol table The build specification properties dialog allows setting –compiler, assembler, and linker programs and flags –macro definitions –the build spec’s default rule as well as –link order –custom rules


Download ppt "® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications."

Similar presentations


Ads by Google