风河Workbench3.0_VxWorks6.6应用程序开发使用说明V1.0

合集下载

VxWorks使用说明书

VxWorks使用说明书

VxWorks使用说明书1、概述VxWorks操作系统的集成环境叫Tornado。

T ornado集成环境提供了高效明晰的图形化的实时应用开发平台,它包括一套完整的面向嵌入式系统的开发和调测工具。

Tornado环境采用主机-目标机交叉开发模型,应用程序在主机的Windows环境下编译链接生成可执行文件,下载到目标机,通过主机上的目标服务器(T arget Server)与目标机上的目标代理(Target Agent)的通信完成对应用程序的调试、分析。

它主要由以下几部分组成:VxWorks高性能的实时操作系统;* 应用编译工具;* 交互开发工具;下面对T ornado集成环境的各组件功能分别介绍:* Tornado开发环境Tornado是集成了编辑器、编译器、调试器于一体的高度集成的窗口环境,同样也可以从Shell窗口下发命令和浏览。

* WindConfig:T ornado系统配置通过WindConfig可选择需要的组件组成VxWorks实时环境,并生成板级支持包BSP的配置。

通过修改config.h可以实现WindConfig的所有功能,并且,可以实现WindConfig不能实现的功能。

* WindSh:Tornado外壳WindSh是一个驻留在主机内的C语言解释器,通过它可运行下载到目标机上的所有函数,包括VxWorks和应用函数。

Tornado外壳还能解释常规的工具命令语言TCL。

WindSh不仅可以解释几乎所有的C语言表达式,而且可以实现所有的调试功能。

它主要有以下调试功能:下载软件模块;删除软件模块;产生任务;删除任务;设置断点;删除断点;运行、单步、继续执行程序;查看内存、寄存器、变量;修改内存、寄存器、变量;查看任务列表、内存使用情况、CPU利用率;查看特定的对象(任务、信号量、消息队列、内存分区、类);复位目标机。

* 浏览器Tornado浏览器可查看内存分配情况、任务列表、CPU利用率、系统目标(如任务、消息队列、信号量等)。

vxworks_cli_tools_users_guide_6.6命令行使用说明

vxworks_cli_tools_users_guide_6.6命令行使用说明

VxWorks®COMMAND-LINE TOOLS USER'S GUIDE6.6Copyright 2007 Wind River Systems, Inc.All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means without the prior written permission of Wind River Systems, Inc. Wind River, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc. The Wind River logo is a trademark of Wind River Systems, Inc. Any third-party trademarks referenced are the property of their respective owners. For further information regarding Wind River trademarks, please see:/company/terms/trademark.htmlThis product may include software licensed to Wind River by third parties. Relevant notices (if any) are provided in your product installation at the following location: installDir/product_name/3rd_party_licensor_notice.pdf.Wind River may refer to third-party documentation by listing publications or providing links to third-party Web sites for informational purposes. Wind River accepts no responsibility for the information provided in such third-party documentation. Corporate HeadquartersWind River Systems, Inc.500 Wind River WayAlameda, CA 94501-1153U.S.A.toll free (U.S.): (800) 545-WINDtelephone: (510) 748-4100facsimile: (510) 749-2010For additional contact information, please visit the Wind River URL:For information on how to contact Customer Support, please visit the following URL: /supportVxWorks Command-Line Tools User's Guide, 6.66 Nov 07Part #: DOC-16079-ND-00Contents1Overview (7)1.1Introduction (7)1.2What’s in This Book (8)1.3Related Documents (9)2Setting Environment Variables (11)2.1Introduction (11)2.2Invoking wrenv (12)2.3Options to wrenv (13)2.4install.properties and package.properties (15)3Configuring and Building VxWorks (17)3.1Introduction (17)3.2Using vxprj (18)3.2.1Creating Kernel Configuration Projects (18)Checking the Toolchain (20)Copying Projects (21)iiiVxWorksCommand-Line Tools User's Guide, 6.6iv Using Profiles (21)3.2.2Deleting Projects (21)3.2.3Modifying Projects (22)Adding Components (22)Removing Components (23)Setting Configuration Parameter Values (23)Changing the Project Makefile Name (24)Adding and Removing Individual Files (24)3.2.4Generating Project and Component Diagnostics (24)Obtaining a List of Components (24)Checking a Component (26)Checking Component Dependencies (26)Listing Configuration Parameters and Values (26)Listing the Source Files in a Project (27)3.2.5Building Kernel Configuration Projects with vxprj (28)Examining Build Specifications and Rules (28)Changing Build Settings (29)Adding and Changing Build Rules (29)3.2.6Example vxprj Session (30)3.2.7Creating a Standalone Kernel Image (30)3.3Using cmpScriptLib and Other Libraries (31)3.3.1Building Kernel Configuration Projects with cmpScriptLib (32)4Configuring and BuildingApplication Projects (33)4.1Introduction (33)4.2Other VxWorks Project Types (34)4.3RTP and Library Projects (35)4.4RTP Applications and Libraries (35)4.4.1RTP Application Makefiles (35)4.4.2RTP Libraries (37)Contents4.4.3Makefile and Directory Structure (37)4.4.4Rebuilding VxWorks RTP (User-Mode) Libraries (37)4.4.5Make Variables (38)4.5Downloadable Kernel Modules (41)5Connecting to a Target (43)5.1Introduction (43)5.2Connecting to a Target Board (43)5.3Using the VxWorks Simulator (44)A Configuring and Building VxWorks Using config.h (47)A.1Introduction (47)A.2Configuring an Image Using config.h (48)A.3Configuration Examples (49)A.3.1Removing Network Support (49)A.3.2Adding RTP Support (49)A.4Using make (50)A.4.1Makefile Details (50)Customizing the VxWorks Makefile (51)Commonly Used Makefile Macros (51)A.4.2Building Custom Boot Loaders (55)Index (57)vVxWorksCommand-Line Tools User's Guide, 6.6 vi1Overview1.1Introduction71.2What’s in This Book81.3Related Documents91.1IntroductionThis guide describes the command-line host tools provided with VxWorks. Itcomplements the Wind River Workbench User’s Guide for programmers who preferto do development tasks outside of the Workbench IDE’s graphical interface orwho need to create scripted build environments.The Workbench IDE includes many features, such as code browsing, host-targetcommunication, and multicore debugging, that are not available from thecommand line. For a complete description of the Workbench environment, see theWind River Workbench User’s Guide. For information about the VxWorks operatingsystem and developing applications that run under it, see the VxWorks KernelProgrammer’s Guide and VxWorks Application Programmer’s Guide.Workbench ships with two compilers and associated toolkits: The Wind RiverCompiler (sometimes called the Diab compiler) and GCC (part of the GNUproject). Both toolkits use the GNU make utility for VxWorks applicationdevelopment. To the largest extent possible, these toolkits have been designed forinteroperability, but it is not always safe to assume that code written for one set of7VxWorks Command-Line Tools User's Guide, 6.68tools will work perfectly with the other. While examples in this guide may use either or both compilers, it is best to select one compiler and toolkit before starting a project.The Wind River Compiler and tools are documented in a separate user’s guide for each supported target architecture. For example, information about the PowerPC compiler is in the Wind River Compiler for PowerPC User’s Guide . GCC and the other GNU tools are documented in a series of manuals from the Free SoftwareFoundation, including Using the GNU Compiler Collection , that are provided with this release.Workbench includes a variety of other tools whose use is illustrated in this guide. In many cases, readers are referred to another document for detailed information about a tool. This guide is a roadmap for command-line development, but it is not self-contained.Before starting to work with the tools, read 2.Setting Environment Variables .1.2 What’s in This BookThis guide contains information about the following topics:■This chapter introduces the command-line tools and reviews the contents ofthe guide.■Chapter 2 shows how to use the environment utility (wrenv ) to setenvironment variables in a host development shell.■Chapter 3 explains how to create and modify projects with vxprj and other Tcl scripts. It discusses VxWorks components and kernel configuration.■Chapter 4 explains how to build applications with vxprj and other tools, and describes the VxWorks build model.NOTE: Throughout this guide, UNIX refers to both Solaris and Linux hostdevelopment environments. Windows refers to all supported versions of Microsoft Windows.Examples in this guide include both UNIX and Windows command lines. It is assumed that the reader can make appropriate modifications—such as changing forward slashes (/) to backward slashes (\)—depending on the environment.1 Overview 1.3 Related Documents91■Chapter 5 explains how to run compiled applications on targets and simulators.1.3Related DocumentsWind River Workbench Host Shell User’s GuideWind River Workbench User’s GuideWind River VxWorks Kernel Programmer’s GuideWind River VxWorks Application Programmer’s GuideWind River VxWorks Simulator User’s GuideVxWorksCommand-Line Tools User's Guide, 6.6 102 Setting Environment Variables2.1Introduction112.2Invoking wrenv122.3Options to wrenv132.4install.properties and package.properties152.1IntroductionTo use the tools efficiently from the command line, you need to configure someenvironment variables and other settings. The best way to do this is with the wrenvenvironment utility, which sets up a development shell based on information in theinstall.properties file.When using the Workbench tools from the command line, always begin by invoking theenvironment utility as shown in the next section. The wrenv utility, which is also runby the IDE on startup, guarantees a consistent, portable execution environmentthat works from the IDE, from the command line, and in automated build systems.Throughout this guide, whenever host operating system commands are shown ordescribed, it is assumed that you are working from a properly configureddevelopment shell created by wrenv.VxWorksCommand-Line Tools User's Guide, 6.62.2Invoking wrenvAssuming a standard installation of Workbench, you can invoke wrenv as follows.UNIXAt your operating system’s shell prompt, type the following:% installDir/wrenv.sh -p vxworks-6.6However, if your shell configuration file overwrites the environment every time anew shell is created, this may not work. If you find that you still cannot invoke theWorkbench tools after executing the command above, try this instead:% eval `installDir/wrenv.sh -p vxworks-6.6 -o print_env -f shell`where shell is sh or csh, depending on the current shell program. For example: % eval `./wrenv.sh -p vxworks-6.6 -o print_env -f sh`WindowsYou can invoke wrenv from the command prompt by typing the following:C:\> installDir\wrenv.exe -p vxworks-6.6You can also invoke wrenv and start a development shell window using theshortcut installed under Start>Programs> Wind River> VxWorks6.6&General Purpose Technologies>VxWorks Development Shell. This shortcutinvokes wrenv to open a Windows command prompt configured with the properenvironment variables.Workbench also supplies a fully configured Windows version of the Z shell(sh.exe). The Z shell, sometimes called zsh, gives Windows users a UNIX-likecommand-line interface.2 Setting Environment Variables2.3 Options to wrenv 22.3 Options to wrenvThe wrenv utility accepts several options, summarized in Table 2-1, that can beuseful in complex build environments. For most purposes, -p is the only optionyou need.T able 2-1Options for wrenv Option Meaning Example-e Do not redefine existing environment variables.(Variables identified with addpath ininstall.properties are still modified.)% wrenv.sh -p vxworks-6.6 -e -f format Select format for print_env or print_vars (see -o ):plain (the default)shcshbattclC:\> wrenv -p vxworks-6.6 -o print_vars -f sh -i path Specify the location of install.properties .(Overrides the default method of findinginstall.properties .)% wrenv.sh -p vxworks-6.6 -i directoryPath /install.properties-o operation Select operation :runThe default operation. Configures theenvironment and creates a command shellin which subsequent commands areexecuted. Checks the value of SHELL(usually defined under UNIX) todetermine which shell program to invoke;if SHELL is not defined, it checks ComSpec(Windows).C:\> wrenv -p vxworks-6.6 -o run % wrenv.sh -p vxworks-6.6 -o runprint_vars aShow environment settings that would bemade if wrenv were invoked with -o run .C:\> wrenv -o print_varsVxWorksCommand-Line Tools User's Guide, 6.6print_env aLike print_vars, but shows only variablesthat are exported to the systemenvironment. (Such variables are identifiedwith export or addpath, rather thandefine, in install.properties.)% wrenv.sh -o print_envprint_packages aList the packages defined ininstall.properties and their attributes. (Thedisplayed name of a package can later bespecified with the -p option.)C:\> wrenv -o print_packagesprint_compatible aUse with -p. Show the list of packagesdefined in installation.properties ascompatible with the specified package.Helpful for determining which IDEversion works with a given target OSplatform.% wrenv.sh -p vxworks-6.6 -o print_compatibleprint_package_name aUse with -r. Show the name of the package in the specified root directory.C:\> wrenv -r directory -o print_package_name-p package Specifyapackage (a set of Workbench components)for environment initialization. The package mustbe defined in install.properties.% wrenv.sh -p vxworks-6.6-r root Specify the root path for a package. (Overrides the default method of finding packages.) Usually, theroot path is a directory under installDir that has thesame name as the package.C:\> wrenv -p vxworks-6.6 -r directory-v Verbose mode. Show all altered environment settings.% wrenv.sh -p vxworks-6.6 -vT able 2-1Options for wrenv (cont’d)Option Meaning Example2 Setting Environment Variables2.4 install.properties and package.properties 22.4 install.properties and package.propertiesThe install.properties file is a hierarchical registry of package components. Itaggregates information from the package.properties files that accompany eachinstalled package. An entry in a properties file has the following form:rootkey .subkey [=value ][.subkey [=value ] ...]env =value Set the specified variable in addition to other environment settings. Overridesinstall.properties .b env =value must be the last itemon the command line, except for command [args ] (seebelow).C:\> wrenv -p vxworks-6.6 PATH=directory command [args ]Execute the specified command in the new shellenvironment. (Does not open a new shell.) Must be the last item on the command line.% wrenv.sh -p vxworks-6.6 ls *.sha.These operations are primarily for internal use and may change in later releases.b.Once a setting has been overridden with this option, wrenv maintains the override on subsequentexecutions—even if the option is omitted from the command line—as long as the new shell is running. A list of overridden settings is stored in a temporary variable called WIND_PROTECTED_ENV that disappears when the shell terminates.T able 2-1Options for wrenv (cont’d)Option Meaning ExampleVxWorksCommand-Line Tools User's Guide, 6.6A root key (for example, vxworks66) identifies each package. Subkeys include name, version, and so forth. The entries for a typical package look like this: =vxworks-6.6vxworks66.version=6.6vxworks66.type=platformvxworks66.subtype=vxworksbel=Wind River VxWorks 6.6# this entry shows which version of Workbench works with vxworks-6.6patible=workbench-2.2# eval entries tell wrenv to make environment settings; see belowvxworks66.eval.01=export WIND_HOME=$(builtin:InstallHome)vxworks66.eval.02=export WIND_BASE=$(WIND_HOME)$/vxworks-6.6vxworks66.eval.03=require workbench-3.0vxworks66.eval.04=addpath PATH $(WIND_BASE)$/host$/$(WIND_HOST_TYPE)$/bin ...An eval subkey specifies an environment processing command, such as defining an environment variable. Each eval subkey has a unique integer subkey appended to it that determines the order in which wrenv executes commands. However, if there are multiple definitions for the same variable, the first (lowest-numbered) definition takes precedence and subsequent definitions are ignored.A define value for an eval key defines a variable for internal use, but does not export it to the system environment. An export value defines a variable and exports it to the system environment. An addpath value prefixes an element to an existing path variable.A require value for an eval key specifies the name of another package in which to continue eval processing. An optional value is similar to a require value, except that the command is treated as a no-op if the referenced package does not exist. Comment lines in a properties file begin with a # symbol.Properties files are created during installation and should not ordinarily be edited.3Configuring and BuildingVxWorks3.1Introduction173.2Using vxprj183.3Using cmpScriptLib and Other Libraries313.1IntroductionThis chapter explains how to create and modify VxWorks projects with the vxprjutility and related Tcl libraries. It contains information about VxWorkscomponents and kernel configuration. It also describes the use of profiles andbundles to provide higher-level logical groupings of components.A VxWorks component is a functional unit of code and configuration parameters. Aproject is a collection of components and build options used to create an applicationor kernel image. Components are defined with the Component DescriptionLanguage (CDL) and stored in .cdf files; for more information about componentsand CDL, see the VxWorks Kernel Programmer’s Guide. Projects are defined in .wpjor .wrproject files1; for more information about projects, see the Wind RiverWorkbench User’s Guide.1..wrproject files are created and used by the IDE.VxWorksCommand-Line Tools User's Guide, 6.6Wind River provides a variety of tools for managing projects:■For most purposes, vxprj is the easiest way to manage kernel configuration projects from the command line. However, vxprj manages kernelconfiguration projects only. (A kernel configuration project, also called a VxWorksimage project, is a complete VxWorks kernel, possibly with additionalapplication code, that can be downloaded and run on a target.)■Other Tcl libraries supplied with VxWorks—especially cmpScriptLib—provide direct access to scripts called by vxprj.■The IDE‘s project management facility handles additional types of project, such as downloadable kernel modules, shared libraries, RTPs, and file systemprojects, and offers features of its own that are not available fromcommand-line tools.■The default make system that uses Makefiles and the config.h file provide BSP and driver developers a way to build kernels. In general, this method of buildmanagement should only be used for early-stage development.It is always possible to create and modify projects by directly editing VxWorkscomponent and source code files. However, if you plan to continue using theWorkbench or vxprj project management tools, you should not directly editgenerated project files or makefiles3.2Using vxprjThis guide covers only the most important vxprj functionality. For a completedescription of vxprj and all of its options, see the vxprj reference entry. Forinformation about using vxprj to invoke the compiler, see 4.Configuring andBuilding Application Projects.3.2.1Creating Kernel Configuration ProjectsThe command-line vxprj utility can create a project based on an existing boardsupport package (BSP)—that is, a collection of files needed to run VxWorks on aspecific piece of hardware.2 To create a kernel configuration project, type thefollowing:3 Configuring and Building VxWorks3.2 Using vxprj 3vxprj create [-source ] [-smp ] [-profile profile ] BSP tool [projectFile |projectDirectory ] The command sequence above uses the following arguments:-sourceAn optional argument to enable source build. A project can be built from source if both of the following are true:■The -source option is used.■All components in your project support the -source option.If either of these conditions is not true, the project is created from pre-built libraries (the default). After the project has been created, you can change the build mode.Note that only certain kernel profiles (the PROFILE_BASIC_KERNEL and PROFILE_MINIMAL_KERNEL ) support the -source option. If you modify a pre-defined kernel profile by including additional components, building from source may not be possible. If you specify the -source option, and building from source is not possible, vxprj will notify you of that fact and use the libraries to build.For complete details on this option, see the vxprj reference entry.-smpAn optional argument that enables an SMP kernel. Vxprj will now verify that BSPs support SMP and will give an error when the feature is not available. For example,vxprj create -smp sb1480_0_mips64 diabException while creating project : "option SMP not available for BSP sb1480_0_mips64"-profile profileAn optional argument to specify the kernel profile type to be built. If you do not specify a profile, the project is built according to the default profile that is defined for your BSP . For information on profiles, see Using Profiles , p.21, and the VxWorks Kernel Programmer’s Guide: Kernel .BSPThe name or location of a BSP .toolA recognized compiler (usually diab or gnu ). See Checking the Toolchain , p.20 for information about determining valid compilers for a given BSP .2.For information about BSPs, see the VxWorks BSP Developer’s Guide .VxWorksCommand-Line Tools User's Guide, 6.6projectFile|projectDirectoryAn optional argument to specify the name of the project file to create, or thename of its parent directory. If no filename or directory is specified, vxprjgenerates a name based on the other input arguments and stores the resultingproject in a new directory under installDir/target/proj.If you do not have a target board for your application, the easiest way toexperiment with vxprj is to create projects for the VxWorks Simulator. A standardWorkbench installation includes a BSP for the simulator. For example:C:\> vxprj create simpc diab C:\myProj\myproj.wpjThis command creates a kernel configuration project to be built with the WindRiver compiler (diab) and run on the VxWorks Simulator for Windows (simpc).The project file (myproj.wpj), source files, and makefile are stored in C:\myProj.To generate a similar project for Solaris or Linux hosts, specify solaris or linux asthe BSP, type the following:% vxprj create solaris diab /myProj/myproj.wpj$ vxprj create linux diab /myProj/myproj.wpj(For more information about the VxWorks Simulator, see 5.3Using the VxWorksSimulator, p.44, and the Wind River VxWorks Simulator User’s Guide.)The following command creates a project in the default location using thewrSbcPowerQuiccII (PowerPC) board support package:% vxprj create wrSbcPowerQuiccII diabWhen this command is executed, vxprj creates a subdirectory for the new projectand reports the location of directory.The following command creates a GCC project in C:\myProjects\mips64\ usingthe rh5500_mips64 BSP:C:\> vxprj create rh5500_mips64 gnu C:\myProjects\mips64\mipsProject.wpj The project file created by this command is called mipsProject.wpj.Checking the ToolchainYou can use vxprj to check the valid toolchains for a BSP:% vxprj tccheck list BSPFor example:% vxprj tccheck list sb1250a_0_mipsi643diab sfdiab gnu sfgnuCopying Projects To copy an existing project to a new location, type the following:vxprj copy [sourceFile ] destinationFile |destinationDirectory If no source file is specified, vxprj looks for a .wpj file in the current directory. If a destination directory—but no destination filename—is specified, vxprj creates a project file with the same name as the directory it resides in. For example:% vxprj copy myproj.wpj /NewThis command copies myproj.wpj and associated files to /New/New.wpj .Using ProfilesA profile is a preconfigured set of components that provides a starting point for custom kernel configuration. For example, PROFILE_DEVELOPMENT includes a variety of standard development and debugging tools. The following command creates a PROFILE_DEVELOPMENT -based project in the default location using the wrSbcPowerQuiccII BSP:% vxprj create -profile PROFILE_DEVELOPMENT wrSbcPowerQuiccII diabThe profile affects only the components use to create the project: after creation, the project does not retain any information about the profile used to create it.For a list of profiles, see the VxWorks Kernel Programmer’s Guide: Kernel .3.2.2 Deleting ProjectsTo delete a project, type the following:vxprj delete projectFilewhere projectFile is the .wpj file associated with the project. The delete command permanently deletes the directory in which projectFile resides and all of its contents and subdirectories. (Do not run the command from the project directory you are trying to remove.) For example:% vxprj delete /myProj/myproj.wpjThis command deletes the entire myProj directory.!CAUTION: vxprj delete removes any file passed to it, regardless of the file’s name or extension, along with the entire directory in which the file resides. It does notverify that the specified file is a Workbench project file, nor does it attempt to saveuser-generated files.3.2.3Modifying ProjectsAdding ComponentsTo add components to a kernel configuration project, type the following:vxprj component add [projectFile]component[component ... ]If no project file is specified, vxprj looks for a .wpj file in the current directory andadds the specified components to that file. Components are identified by thenames used in .wpj and .cdf files, which have the form INCLUDE_xxx. Forexample:% vxprj component add MyProject.wpj INCLUDE_MMU_BASIC INCLUDE_ROMFS This command adds support for a memory management unit and the ROMFStarget file system to MyProject.wpj.Adding BundlesSome components are grouped into bundles that provide related or complementaryfunctionality. Adding components in bundles is convenient and avoids unresolveddependencies.To add a bundle to a project, type the following:vxprj bundle add [projectFile]bundle[bundle ... ]For example:% vxprj bundle add BUNDLE_RTP_DEVELOPThis command adds process (RTP) support to the kernel configuration projectin the current working directory.% vxprj bundle add MyProject.wpj BUNDLE_RTP_DEVELOPBUNDLE_STANDALONE_SHELL BUNDLE_POSIX BUNDLE_EDRThis command adds support for processes, the kernel shell, POSIX, and errordetection and reporting to MyProject.wpj.3Removing ComponentsTo remove components from a kernel configuration project, type the following:vxprj component remove [projectFile ] component [component ... ] If no project file is specified, vxprj looks for a .wpj file in the current directory. For example:% vxprj component remove MyProject.wpj INCLUDE_MMU_BASIC INCLUDE_DEBUG This command removes the specified components as well as any components that are dependent on them .Removing BundlesTo remove a bundle, type the following:vxprj bundle remove [projectFile ] bundle [bundle ... ]Setting Configuration Parameter ValuesTo set the value of a configuration parameter, type the following:vxprj parameter set [projectFile ] parameter valueIf no project file is specified, vxprj looks for a .wpj file in the current directory. For example:% vxprj parameter set MyProject.wpj VM_PAGE_SIZE 0x10000This command sets VM_PAGE_SIZE to 0x10000. (To list a project’s configuration parameters, see Listing Configuration Parameters and Values , p.26.)Parameter values that contain spaces should be enclosed in quotation marks. If a parameter value itself contains quotation marks, they can be escaped with \ (Windows) or the entire value surrounded with ’...’ (UNIX). An easier way to set parameter values that contain quotation marks is to use setstring , which tells vxprj to treat everything from the space after the parameter argument to the end of the command line as a single string. For example:% vxprj parameter setstring SHELL_DEFAULT_CONFIG "LINE_LENGTH=128"This command sets SHELL_DEFAULT_CONFIG to “LINE_LENGTH=128”, including the quotation marks.To reset a parameter to its default value, type the following:vxprj parameter reset [projectFile ] parameter [parameter ... ]。

以ARM为例的Vxworks开发工具的使用操作流程

以ARM为例的Vxworks开发工具的使用操作流程

以ARM为例的Vxworks开发工具的使用操作流程一.认识Tornado II和VxworksVxWorks是一种嵌入式的实时操作系统,所谓嵌入式系统就是用户自己开发设计板子,板子上通常有一颗CPU,VxWorks支持32位的CPU,包括Intel公司的x86、Motorola公司的68k和PowerPC、MIPS、ARM、Intel公司的i960、Hitachi公司的SH。

我们设计的板子通常没有软件的自开发能力,所以我们需要一台通用机来辅助开发,这台通用机可以是PC 或工作站,我们称辅助我们软件开发的通用机为宿主机(Host),用户自己开发的板子为目标机(Target)。

宿主机上要有一个集成开发环境(IDE)来辅助我们的软件开发,这套集成开发环境可以运行在Windows95/NT或 UNIX下,包括交叉编译器(Cross Compiler)和交叉调试器(Cross Debugger),所谓交叉编译器就是在宿主机上编译生成可以在目标机上运行的代码IMAGE,交叉调试器就是通过宿主机和目标机之间的某种耦合方式实现前后台调试。

我们称宿主机上的这套集成开发环境为Tornado,编译生成的目标机上的可执行代码IMAGE为VxWorks。

在系统安装的时候,集成调试环境和VxWorks的原材料(一些obj文件)都安装到宿主机上,编译生成的在目标机上运行的IMAGE内包含操作系统。

二.Tornado II IDE的主要组成Tornado II IDE的主要组成部分有:1.集成的源代码编辑器(可惜不支持汉字输入)。

2.工程管理工具。

3.集成的C和C++编译器和make工具。

4.浏览器,用于收集可视化的资源,监视目标系统。

5.CrossWind,图形化的增强型调试器。

6.WindSh,C语言命令外壳,用于控制目标机。

7.VxSim,集成的vxworks目标机仿真器。

8.WindView,集成的软件逻辑分析仪。

9.可配置的各种选项,可以改变归Tornado GUI的外观等。

Workbench安装使用说明

Workbench安装使用说明

Workbench安装使用说明1.版本记录2.Workbench简介Workbench是风河公司为开发VxWorks提供的新一代集成开发环境。

继承了原有Tornaclo集成开发平台的一贯优势,并且功能更加强大。

由于新采用了先进的Eclipoe软件框架结构,从而使整个系统更加开放和易于扩展。

下面介绍它的主要优势。

●开放的Eclipse平台框架增强了eclipse,更加开放、便于扩展。

用户定制使用插件,提高开发效率。

●单一的全功能平台嵌入式软件开发流程:硬件启动、BSP和驱动开放、应用程序开发、测试和验证、生产。

Workbench以一个单一的平台,提了上述开发阶段所需要的几乎所有功能。

●广泛的适用性Workbench平台的广泛适用性主要体现在七“多”上,即多任务、多目标、多模式、多OS、多CPU、多连接形式和多主机环境。

●丰富易用的调试手段动态链接、目标可视、仿真环境对比Tornado,需要说明的是,目前我们使用的处理器是飞思卡尔的Power PC系列处理器,如MPC852,MPC8247等,使用的操作系统是VxWorks 5.5,开发环境是tornado。

随着产品的升级换代,CPU性能要提升,功能要扩展。

往后我们将使用MPC8308,以及双核处理器P1020,P2020等。

这些处理器只有VxWorks 6及以上的操作系统才支持,而VxWorks 6及以上的开发环境不再是Tornado,而是Workbench。

Workbench和Tornado差别对比见附录13.Workbench安装一、VxWorks6.9安装磁盘空间要求:至少12G安装包:DVD-R147826.1-1-00.ISO安装步骤:解压ISO包,执行Setup.exe➢选择安装路径,OK➢直接点击next ➢继续点击next➢待检查更新完后,进入安装激活方式选择界面,选择“permanent activation”,路径上选择“\VxWorks_6.9\install.txt”,点击Next完成。

风河Woorkbench3.0_VxWorks6.6应用程序开发使用说明

风河Woorkbench3.0_VxWorks6.6应用程序开发使用说明

说明:由于开发经验和英语水平有限,在本文档中肯定存在偏差和谬误。

在有疑问的地方,请以风河的官方文档为准。

欢迎联系,指正错误。

QQ:23。

风河Woorkbench3.0/VxWorks6.6使用说明第一章工程视图(Projects Overview)Workbench利用工程( Projects)就像逻辑容器和积木块——它们能够连接在一起创建一个软件系统。

工程( Projects)窗口可以直观地组织工程结构反映在内部的依赖关系上,以及编译和链接的次序。

前期配置的各种不同的工程允许在后面建立或添加工程时使用与之前的工程相同的配置和建立方式,因而只需要极小的输入。

一、Workspace/Project 的设置Wind River Workbench并不知道使用者的源文件在哪一个地方,在开始的使用的时候Wind River Workbench在安装目录下有一个默认的工作空间(workspace )的目录。

但是这不是必需的或者说并不一定是合理的,当使用者的工作空间因为产品升级或者更改安装目录已经完全存储在当前的安装目录树之外的时候!通常,使用者需要把workspace目录设置在当前的源文件树的根目录下并且在此创建Workbench工程。

对于各种不同的源文件树,可以使用不同的工作空间(workspaces)。

当决定在什么地方建立工程(projects)要做以下考虑:1.在workspace建立工程如果使用者想要新建一个工程在workspace下,通常的情况有A.所建的工程还没有建立源文件。

B.所建的工程已经存在源文件,但需要添加进工程。

C.所建的工程不允许设置在源文件目录处。

2.在workspace外部建立工程在创建工程时,点击“Browse”,将要建立的工程放置在在与workspace不同的目录。

通常的情形有:A.所建的工程建立在已有的原文件之上,改变工程目录之后需要对源文件进行添加和链接。

B.所建的工程需要版本控制,而被放置在workspace之外。

VxWorks操作指南

VxWorks操作指南

VxWorks操作指南项目\子项目名称:3G BTS平台分系统拟制部门:科技发展部拟制日期:2000.2.28目录1. 实时嵌入式操作系统V X W ORKS (3)2.V X W ORKS和T ORNADO (4)3.T ORNADO的配置 (5)3.1 主机的设置:Tornado Register (5)3.2 目标的设置 (6)4.T ORNADO开发工具的使用介绍 (7)4.1 Editor (7)4.2 Projects(Tornado 2.0版本特有) (7)4.3 Shell (8)4.4 Debugger (9)4.5 Browser (10)4.6 GNU工具 (10)4.7 Target Server (11)5.V X W ORKS的启动过程及相关例程 (12)5.1 VxWorks启动的一般原理 (12)5.2 MSDOS的启动过程 (13)6.V X W ORKS的多任务管理 (14)6.1多任务 (14)6.2任务状态转换 (14)6.3 wind任务的排序(scheduling)机制 (14)6.4 任务控制 (15)6.5 任务的删除和删除安全 (15)6.6 任务异常处理 (16)6.7 VxWorks系统任务 (16)7任务间通信(原语消息的传递) (16)7.1 概述 (16)7.2 互斥 (17)7.3 同步 (18)7.4 删除安全 (19)7.5 中断和任务间的通信 (19)8应用程序的加载 (19)1.实时嵌入式操作系统VxWorksVxWorks操作系统是一种应用广泛的嵌入式实时多任务操作系统。

其内核WIND具有强占式优先级排序的多任务处理能力,提供了任务间同步和通信的机制,支持中断处理、看门狗定时器和内存管理功能。

VxWorks的开发环境是Tornado,应用程序的开发语言是ANSI C和C++。

VxWorks的开发体系是代理-服务器(Agent-Server)结构体系,即驻留在主机(Host)的开发工具Tornado通过目标服务器(Target Server)指示目标上的目标代理(Target Agent)进行目标板上的操作并将结果返回给主机。

风河Workbench中文说明

风河Workbench中文说明
应用程序组件
风河 Workbench 2.4 提供了下述应用功能组 件: * Eclipse 框架 * 项目系统 * 编译系统 * 编辑器 * 源代码分析器 * 风河编译器 - 风河编译器(适合于和其它目标机操作系 统) - 风河 GNU 编译器(适合于 VxWorks 和风 河 Linux 平台) * 风河调试器
风河 Workbench
产品介绍
风河 Workbench 是设备软件业首选的开放 式、基于标准的开发套件。通过其性能、集 成及实用性的强劲组合,Workbench 不仅能 使企业在通用环境下的设备软件开发更趋 标准化,而且还能够显著提高开发人员、项 目团队和企业的工作效率。
Workbench 提供了: * 开发过程的每一阶段都具有最佳性能,包 括硬件生成、固件开发、应用软件开发和测 试 * 强大的功能——目标击于设备软件开发 过程和测试过程的主要挑战 * 支持跨项目标准化的广泛实用性 - 多目标操作系统支持,包括对 VxWorks6.x、Linux 以及 ThreadX 的支持 - 目 标 机 处 理 器 支 持 ARM 、 ColdFire 、 IA/Pentium、MIPS、PowerPC、SH 以及 XScale 处理器 - 插件架构,可添加其它目标机操作系统、 目标机处理器以及目标机连接支持 * 基于 Eclipse 的可扩展框架——能够为可 裁剪性和完全用户化而无缝集成第三方和 专用内部插件
- 重构支持源代码分析 - 支持远程编译 * VxWorks 平台集成 - 扩展的 VxWorks 6.2 处理器支持 - VxWorks 可裁剪性支持 - 基于 TIPC 的分布式调试能力 * Linux 平台集成 - 扩展的处理器支持 * 芯片级调试 - 扩展的处理器支持 - 用于 ARM、ColdFire、MIPS、PowerPC 以及 Xscale 的已知 VxWorks 芯片级调试 (VxWorks 5.5 和 VxWorks 6) * 新的 Workbench 产品 - 用于 VxWorks 的 Workbench Unit Tester * 显著降低了代码测试时间,并通过自动化 操作提高了一致性 * 支持单元测试和代码集成测试的集成能 力 * 测试的代码覆盖分析 - 用于 VxWorks 的 Workbench Diagnostics * 动态记录、诊断和纠正系统问题 * 能够添加有像 printf 功能的软件插桩,而 无需重新编译代码 * 当需要时,能用最小的系统负载采集充分 的诊断信息 * 通过分析 core file,以便能够更好的了解 故障原因 * 设计设备软件易测性

风河Workbench中文说明

风河Workbench中文说明
主要性能
* 安 装 有 Eclipse 的 Workbench , 或 将 Workbench 安装到现有的 Eclipse 安装程序 中 * 可使用 Eclipse 所提供的大量窗口小部件 库来创建丰富且实用的视图 * 快速通过工作区资源树导航 * 可保留已更改/已删除文件的历史记录 * 共享用户间项目以充分利用源代码 * 利用透视图(Perspectives)来控制视图、 可视性、编辑器布局以及工作流 * 在工作区内读取、创建、修改或删除源文 件 * 通过使用集成的帮助系统能够快速地查 找信息 * 易于管理用户的喜好和配置数据 * 支持国际化和本土化语言翻译 * 支持 GUI 和命令行 * 无缝工具集成
风河 Workbench
产品介绍
风河 Workbench 是设备软件业首选的开放 式、基于标准的开发套件。通过其性能、集 成及实用性的强劲组合,Workbench 不仅能 使企业在通用环境下的设备软件开发更趋 标准化,而且还能够显著提高开发人员、项 目团队和企业的工作效率。
Workbench 提供了: * 开发过程的每一阶段都具有最佳性能,包 括硬件生成、固件开发、应用软件开发和测 试 * 强大的功能——目标击于设备软件开发 过程和测试过程的主要挑战 * 支持跨项目标准化的广泛实用性 - 多目标操作系统支持,包括对 VxWorks6.x、Linux 以及 ThreadX 的支持 - 目 标 机 处 理 器 支 持 ARM 、 ColdFire 、 IA/Pentium、MIPS、PowerPC、SH 以及 XScale 处理器 - 插件架构,可添加其它目标机操作系统、 目标机处理器以及目标机连接支持 * 基于 Eclipse 的可扩展框架——能够为可 裁剪性和完全用户化而无缝集成第三方和 专用内部插件
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

说明:由于开发经验和英语水平有限,在本文档中肯定存在偏差和谬误。

在有疑问的地方,请以风河的官方文档为准。

欢迎联系,指正错误。

QQ:1039309823。

风河Woorkbench3.0/VxWorks6.6使用说明第一章工程视图(Projects Overview)Workbench利用工程( Projects)就像逻辑容器和积木块——它们能够连接在一起创建一个软件系统。

工程( Projects)窗口可以直观地组织工程结构反映在内部的依赖关系上,以及编译和链接的次序。

前期配置的各种不同的工程允许在后面建立或添加工程时使用与之前的工程相同的配置和建立方式,因而只需要极小的输入。

一、Workspace/Project 的设置Wind River Workbench并不知道使用者的源文件在哪一个地方,在开始的使用的时候Wind River Workbench在安装目录下有一个默认的工作空间(workspace )的目录。

但是这不是必需的或者说并不一定是合理的,当使用者的工作空间因为产品升级或者更改安装目录已经完全存储在当前的安装目录树之外的时候!通常,使用者需要把workspace目录设置在当前的源文件树的根目录下并且在此创建Workbench工程。

对于各种不同的源文件树,可以使用不同的工作空间(workspaces)。

当决定在什么地方建立工程(projects)要做以下考虑:1.在workspace建立工程如果使用者想要新建一个工程在workspace下,通常的情况有A.所建的工程还没有建立源文件。

B.所建的工程已经存在源文件,但需要添加进工程。

C.所建的工程不允许设置在源文件目录处。

2.在workspace外部建立工程在创建工程时,点击“Browse”,将要建立的工程放置在在与workspace不同的目录。

通常的情形有:A.所建的工程建立在已有的原文件之上,改变工程目录之后需要对源文件进行添加和链接。

B.所建的工程需要版本控制,而被放置在workspace之外。

3.将工程建立在workspace之内但是连接到外部位置在创建工程时,选择Browse,定位到使用者的源文件目录,当不愿意因为工程文件的加入而是原文件增大或者不想把源文件复制到workspace。

通常的情形有:A.所建的工程不允许设置在源文件目录处。

B.所建的工程因为开发团队的成员有自己的工程,并且共享了部分源文件(通常为只读的)。

这种选择就避免在团队成员之间通过Workbench互相配合工作是需要建立的象征性的连接。

注意:如果要使用一个早期版本的 Workbench创建了一个workspace,在使用当前版本的Workbench打开此workspace时,必须先升级此workspace的结构!有一个对话框提醒使用者这种升级会使得workspace与早期的版本不相匹配,选择“OK"升级,或者选择“cancel”去选择不同的workspace。

二、创建一个新工程(Projects)尽管使用者可以将工程建立在任何位置,但是通常还是建立在自己的workspace中。

这样就不需要在建立工程时跳转到外部目录。

如果在workspace创建了一个工程,必须在外部所创建的工程处设置写允许,因为Workbench的工程管理文件要写到此处。

可以点击工具按钮或者选择 File>New>Wind River Workbench Project 创建一个之前配置好的工程,或者是创建一个特殊类型的工程;也可以选择File > New > Example 打开一个例子工程。

无论选择种菜单命令,都会由导航菜单一步一步选择,直到创建需要的特定类型的工程,接下来将介绍以下各工程的创建:A.Creating VxWorks Image ProjectsB. Creating Boot Loader/BSP ProjectsC. Creating VxWorks ROMFS File System ProjectsD. Creating VxWorks Real-time Process ProjectsE. Creating VxWorks Shared Library ProjectsF. Creating VxWorks Download able Kernel Module ProjectsG. Creating User-Defined ProjectsH. Creating Native Application Project1.工程创建之后的修改所有工程的创建导航设置都可以修改一旦工程已经存在。

在Project Explorer窗口,选中工程文件夹,例如“ball”,单击右键在下拉菜单中选中“Properties”,就可以在相应工程的" project properties"界面进行修改,如下图:工程的结构设置(包括使用者创建的超级工程),也可以很容易的修改,在Project Explorer窗口,选中工程文件夹,例如“ball”,单击右键在下拉菜单中选中Project References > Add as Project Reference,在弹出的菜单里就可以设定个工程之间的结构关系,如下图所示:2.工程与应用程序(Application Code)工程以一种或几种类型管理应用程序文件。

可以将一个与Workbench兼容的工程整个加入,也可以添加新的或者已经存在的源程序文件。

选择 File > Import 打开“Import File ”对话框进行相关操作。

三、各工程类型结构不同类型的工程有着不同的用处,Workbench支持多种类型的工程,在Project Explorer 窗口可以看见不同类型的工程有着不同的符号标志,见下图:1.VxWorks Image Project(VIP)用VxWorks Image Project 工程配置(自定义或裁剪)并编译一个内核映像用以启动目标板( boot target)。

通过添加VxWorks ROMFS 文件系统、内核模块(kernel modules)、应用程序(applications)、库(libraries)、数据文件(data files),可以把整个系统联接进如一个映像(single image)。

一个VxWorks Image project既可基于一个同类型的Image project也可基于一个BSP( Board Support Package)。

2.VxWorks Boot Loader/BSP Project(BSP)VxWorks Boot Loader/BSP工程用于创建一个VxWorks boot loader也称为VxWorks boot ROM 在启动时下载一个带vxworks内核的目标映像。

也可以把一个已经存在的同类型的工程的源文件复制到使用者创建的工程中,然后在不改变 VxWorks 所在目录的情况下自定义工程。

在开发环境中boot loader被用来从主机下载一个VxWorks映像;在最终的产品中boot loader和操作系统映像存储在同一个磁盘上。

boot loader和VxWorks并不需要在ROM中单独存储。

3.VxWorks Downloadable Kernel Module Project(DKM)利用VxWorks Downloadable Kernel Module 工程管理和建立一个存在于内核空间(kernel space)模块(modules)。

可以单独建立模块运行和调试,可以自由的在目标(target)上运行VxWorks,下载,卸载,重载。

一旦模块完成就可以静态的链接到内核(kernel),或者模块也可以使用一个存在的文件系统。

DKM工程示意图(不包含文件系统)内核模式的开发是VxWorks 传统的开发方法,所有的任务(tasks)都在启动(spawn)之后运行在一个没有保护的环境。

Downloadable Kernel Module在目标已经启动之后,可以启动应用程序。

4.VxWorks Real-time Process Project(RTP)VxWorks Real-time Process可以管理和建立可执行文件在内核空间之外。

可以单独运行和调试可执行文件。

对于Real-time任务就像一个完全独立的程序下载到一个单独的程序运行地址空间( process address space)。

一个Real-time的程序的二进制文件可以像ROMFS文件系统一样存在于目标的(target-side)文件系统。

Real-time 程序执行时对于内核就像单独的实体,如下图所示:关于如何连接到共享库(Shared Libraries),参看平台所带的帮助信息。

5.VxWorks Shared Library Project(Libs)VxWorks Shared Library的库文件会动态连接到运行的VxWorks实时程序,要连接到RTP工程,必须将共享库( shared library)储存在目标侧的文件系统。

也可以通过VxWorks Shared Library工程建立一个子工程在编译时静态链进入其他的工程。

更多的信息在平台帮助信息中查看,其路径为: Help > Cheat Sheets > Wind River Workbench > Setup a VxWorks RTP with a shared library 。

6.VxWorks ROMFS File System Project(ROMFS)VxWorks ROMFS File System 工程可以作为任何一个需要目标侧文件系统的工程的子工程。

这种工程类型设计用来建立应用程序或者其他任何类型的文件,带一个VxWorks系统映像的ROMFS文件系统,除了是vxworks的引导映像并不需要任何的存储介质。

所以并不需要其他的文件系统存储文件,系统也具有完全的功能而不需要求助local文件系统、NFS 驱动、RSH 、或者FTP 协议等等。

需要注意的是ROMFS与ROM 媒介没有任何关系,名字代表的意思是Read Only Memory File System。

ROMFS工程示意图:er-Defined Projects(UDP)User-Defined projects 为用户设置和保存自己的编译系统、文件系统布局等等。

用户接口提供以下支持:A.可以用编译命令(build command )开展用户的编译功能,这样就允许在Workbench GUI界面进行编译。

相关文档
最新文档