From RTSC-Pedia

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

RTSC Module Primer/Lesson 0

Getting started — installing examples and tools

The steps outlined here will enable you to "play-along" as we work through a series of RTSC programming examples introduced in the lessons that follow. If you'd prefer to just read through the lessons right now, no problem—we've designed the material with that in mind. You might, however, consider quickly unpacking the examples for easy reference, even if you don't plan to build and run any programs at this time.

Contents

Unpacking the examples

You'll find the examples here, distributed as a single .zip file which you should extract into a (new) directory of your choice—a directory we'll logically refer to as «examples» in the material that follows. If you're operating in "read-only" mode for now, proceed onward to Lesson 1.

Downloading the XDCtools product

To build and run the examples, you'll need to download and install the XDCtools product found here; or, if you've already installed XDCtools on your system, verify that you're working with version 3.15 or higher. Either way, we'll logically refer to the installation directory for the XDCtools product as «xdcroot» in the material that follows.

Assigning environment variables

Next, you'll need to assign the actual name of the «examples» directory chosen earlier to an environment variable named XDCPATH. For convenience, you might also add a reference to the «xdcroot» installation directory to the beginning of your standard search PATH; or, since we'll only be using a few commands found here, feel free to setup an alias to «xdcroot» instead.

To verify these steps, enter xs xdc.tools.path -p from the command-line. If you've correctly added «xdcroot» to your search path and you've correctly assigned «examples» to the XDCPATH environment variable, the following output should appear:

 
 
>> xs xdc.tools.path -p
«examples»;«xdcroot»/packages;

The first absolute-path in this list corresponds to the actual name of your «examples» directory; the second absolute-path references a well-known sub-directory named packages beneath your «xdctools» installation.

Locating some C compilers

For instructional purposes, we'll be working with two different C compiler tool-chains:

Texas Instruments C6000 Code Generation Tools — version 6.0.15

  • Windows-hosted developers can download this version of the compiler from here; Linux-hosted developers can download this version of the compiler from here. Either way, «c6xtools» will refer to the installation directory for this compiler in the material that follows.

If you haven't already done so, you'll need to register for a free account with Texas Instruments.

GCC — version 3.4.5 for Windows, version 4.1 for Linux

  • For Windows-hosted developers, we'll be using MinGW—a Minimal port of the GNU tool-chain for Windows— which contains GCC (the GNU Compiler Collection) and which you can download using the MinGW installer found here; «gcctools» will refer to the installation directory for MinGW in the material that follows. Be sure to check the g++ box on the installer's optional components menu; otherwise, you can simply accept the defaults given.

  • For Linux-hosted developers, you already have GCC installed on your system and «gcctools» will refer to its base directory; just verify that you have version GCC 4.1 (or later).

Configuring for build

Finally, you'll need to edit two files found in the «examples» directory:

  • common.mak, used when building client examples in Lessons 1-4; and
  • config.bld, used when building all examples in Lessons 1-9.

common.mak.  Starting with the first file, edit the following pair of lines at the top of common.mak and substitute the actual directory names corresponding to «xdcroot» and «c6xtools»:

common.mak
 
 
 
XDCROOT = «xdcroot»
C6XTOOLS = «c6xtools»    
   ...

Windows-hosted developers should surround «xdcroot» or «c6xtools» with double-quotes "..." if these directory paths contain any spaces in their names.

Linux-hosted developers should also edit the definition of the RMCMD symbol per instructions found in common.mak.

config.bld.  The second file should look something like this if you are a Windows-hosted developer:

config.bld
 
 
 
1
 
2
 
 
3
 
 
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
 
var C64P = xdc.useModule('ti.targets.C64P');
var GCC = xdc.useModule('gnu.targets.Mingw');
 
C64P.rootDir = "«c6xtools»";
C64P.platform = 'ti.platforms.sim64Pxx';
 
GCC.rootDir = "«gcctools»";
 
Build.targets = [C64P, GCC];

You'll need to alter the double-quoted strings "..." on lines 2 and 3 to respectively reference the installation directories for the C6000 and GCC tools established earlier.

Linux-hosted developers should also substitute the string 'gnu.targets.Linux86' on the line labeled 1.

See also

XDCtools Installation Guide How to install the XDCtools product
Using XDCtools Commands Setting up your development environment

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