1 / 46

Projects

Projects. 2.1 Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications. Projects and Workspaces. Tornado uses projects and workspaces to manage user code, configure VxWorks, and specify build settings.

jade-brown
Download Presentation

Projects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Projects 2.1 Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications

  2. 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 • [UNIX] by selecting the Project button from the Tornado launcher. • [Windows] automatically when Tornado starts up, or later by selecting New Project... from the File menu.

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

  4. 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. Workspace Window Workspace tabs display: Files -- Project source and object files. VxWorks -- Included and excluded VxWorks components. Builds -- Build specifications.

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

  7. 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: • 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). • workspaceName.wsp -- Workspace master file. Lists the projects belonging to the workspace. • Makefile -- Generated before a new or modified project is built or saved.

  8. 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 allows configuration of check-in and check-out routines:

  9. Projects Projects Overview 2.2 Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications

  10. 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. • Create a bootable project by selecting File -> New Project... and using the project wizard.

  11. 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. Creating a Bootable Project (Part II) • A bootable VxWorks image is based on: • An existing project (possibly a projectized BSP), or • An installed BSP (found in .../target/config/bspName).

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

  14. 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. VxWorks Components VxWorks facilities are shown in a heirarchical display in 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. Including Components • When component is included, dialog box lists size of component as well as dependent components. • Selecting OK button will include facility and dependent components.

  17. Component Selections

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

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

  20. Configuration Outside the Project Facility • Some VxWorks components require configuration outside of the project facility, usually because of their complexity. • Examples: • DHCP server component -- DHCP lease table is configured in .../target/config/comps/src/net/usrNetDhcpsCfg.c. (For details, see Networking chapter.) • 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. Building VxWorks Download object Build project file or image Rebuild All Stop build Compile selected Update source file dependencies • 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.

  22. Projects Projects Overview Bootable Projects and VxWorks Configuration 2.3 Integrated Simulator Downloadable Projects Build Specifications

  23. 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. 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. 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: • 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. Projects Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator 2.4 Cross Development and Downloadable Projects Build Specifications

  27. 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. Creating a Downloadable Project(Part I) • Choose a project name, project directory, a comment string, and a workspace to add the project to.

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

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

  31. Adding demo.c to Our Project • Add a file to a downloadable project by: • Project -> Add/Include -> File menu item, or • Add Files... item in context menu, • 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. demo.c

  33. Building A Project • 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. • projName.out is not an executable; it is an object module which will be downloaded and dynamically linked to vxWorks. • 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. Unresolved External References

  35. 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. • 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. Showing Modules • Downloaded project modules can be displayed from the browser by: • Selecting Module Information and the proper module (Windows). • Clicking on module name (UNIX).

  37. 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. Projects Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects 2.5 Build Specifications

  39. 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). • To access the build specifications for your project, select the Builds tab in the workspace window.

  40. 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. Compiler Settings • The C/C++ compiler pane allows you to set compiler flags.

  42. Rule Definitions

  43. 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. • 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. • Caveat: If you edit a build spec without touching any project source files, you must Rebuild All... to see the new specification used.

  44. 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. 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 • 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. 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

More Related