From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC 

Using XDCtools Commands

Setting up your development environment

Contents

Running XDCtools commands

XDCtools has just two "core" commands:

xdc - which is used to produce packages, and
xs - which is used to run commands delivered in packages.

Although you may find it convenient to do so, neither of these tools requires that you redefine your workstation's command path. Both of these commands use their location in the file system to locate all shared libraries or utilities necessary for their proper operation. So, it is important that you never move any files contained in or under XDCROOT; you may move the entire directory folder to a new location, but never move any files or directories within XDCROOT.

To simplify running xdc and xs, you can either

Whether you choose to set your PATH or define command aliases, all examples in the documentation assume that the xdc and xs tools can be invoked directly on the command line using just xdc or xs respectively.

Creating command aliases

If you prefer to avoid polluting your path with additional directories, you can define a command aliases that simply expand to the absolute path of the appropriate command. This technique also makes it easy to use multiple versions of the XDCtools product within single command shell environment.

On Windows hosts, you can create aliases using the doskey command from the cmd.exe shell as shown in this example:

set XDCROOT=c:\xdctools_3_10
doskey xdc=%XDCROOT%\xdc.exe $*
doskey xs=%XDCROOT%\xs.exe $*

To avoid retyping these commands they can be placed in a file, say c:/my/init.bat, which can be run from a shortcut used to invoke cmd.exe

cmd.exe /k c:\my\init.bat

If you use a Unix ksh compatible command shell, aliases are set as follows:

set XDCROOT=/home/tools/xdctools_3_10
alias xdc=$XDCROOT/xdc
alias xs=$XDCROOT/xs

These commands can, of course, be placed in your shell's startup file and you should change the definition of XDCROOT to match the installation directory of the XDCtools.

Setting your PATH definition

The XDCtools product does not use the PATH environment variable. However, your operating system and command shell does—PATH defines where the operating system looks for command line programs. To simplify invoking the product's command-line tools, you may want to include the top-level XDCtools directory in your PATH.

To change the Windows PATH (and other Windows environment variables), follow these steps:

  1. Right-click My Computer and choose Properties.
  2. In the System Properties window, choose the Advanced tab.
  3. In the Advanced tab, click the Environment Variables button.
  4. Highlight the Path variable in the "Systems variables" area and click Edit.
  5. Add the directory in which you installed XDCtools to the end of the current Path definition. Use a semicolon to separate the locations in the list. For example, you might add the following to your existing Path definition:
    ;c:\xdc_3_10
  6. Click OK in the Environment Variables window and OK in the System Properties window.
  7. Reopen any Command Prompt you want to use with XDC.

To change PATH on Unix systems such as Linux, you need to follow the instructions specific to the command shell you're using. For example, if you are using a ksh compatible shell

export PATH=$PATH:/home/tools/xdc_3_10

Getting more information

You can read the following additional documents to learn more about XDC:

  • XDCtools Release Notes (XDCROOT/release_notes.html). Includes information about software version, upgrades and compatibility, host and target device support, validation, and known issues.
  • XDCtools Installation Guide (XDCROOT/doc/XDC_Installation_Guide.pdf). Includes steps for installing and validating the installation.
  • "CDOC" reference documentation. Contains full reference information about all installed packages and their modules, APIs, configuration options, data structures, etc. See Using the CDOC reference help system for how to use this online system.
  • RTSC Module Primer. Provides information about creating and using RTSC Modules.
  • RTSC Interface Primer. Provides information about creating and using RTSC Interfaces.
  • The XDCscript Language. Provides brief summary of the RTSC meta language used to configure modules and create new commands.

Using the CDOC reference help system

To open the CDOC reference help system, you can choose CDOC from the XDCtools group in the All Programs section of the Windows Start menu.

Alternatively, run the xdc.tools.cdoc.sg tool from any command prompt—including a Linux bash shell.

xs xdc.tools.cdoc.sg

You see the "cdoc" window with a tree view of the RTSC packages available to you. All of these packages provide documentation that can be displayed by the CDOC viewer.

Click "+" next to a directory to expand its list of packages. Click "+" next to a package name to see the list of modules it provides. Double-click on a package or module to see its reference information or simply hover over an item in the tree for a brief summary.

cdoc screenshot

For each topic you view, there is a tab across the top of the page area. You can use these to quickly return to other pages you have viewed. You can also use the arrows next to "Views" to move backward and forward in your history of page views.

To close a page and remove its tab, click the X on the tab.

To directly view a package's documentation without having to navigate through the tree list, simply pass the name of the package (or module) on the command line. For example, to view the xdc.tools.cdoc.sg tool's reference documentation (using itself!), type the following command:

xs xdc.tools.cdoc.sg xdc.tools.cdoc.sg
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC 
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Views
Personal tools
package reference