From RTSC Central

Jump to: navigation, search
  

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.05 or higher. Either way, we'll logically refer to the installation directory for the XDCtools product as %xdcroot% in the material that follows.

  The site currently hosting the XDCtools product requires registration before download. As of 2/15/08, we anticipate availability of version 3.05 in a few weeks time; a link to a release candidate may be posted sooner, however.

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.

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.x

  • For Windows-hosted developers, the Code Composer Studio product—available here in a free evaluation version—includes the compiler in its C6000/cgtools sub-directory, which we'll logically refer to as %c6xtools% in the material that follows.

  • For Linux-hosted developers using either a standalone (commercial) version of the compiler or else a version bundled with a DaVinci Developer's Kit, %c6xtools% refers to the installation directory of the tools themselves.

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 to build client-perspective examples in Lessons 1-4; and
  • config.bld, used to build supplier-perspective examples in Lessons 5-9.

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%:

%examples%/common.mak
 
 
 
XDCROOT = %xdcroot%
C6XTOOLS = %c6xtools%
   ...

Turning now to the config.bld, the file should look something like this if you are a Windows-hosted developer:

%examples%/config.bld
 
 
 
1
 
2
 
 
3
 
 
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
 
var C64 = xdc.useModule('ti.targets.C64');
var GCC = xdc.useModule('gnu.targets.Mingw');
 
C64.rootDir = "%c6xtools%";
C64.platform = 'ti.platforms.load6x';
 
GCC.rootDir = "%gcctools%";
 
Build.targets = [C64, GCC];

For Linux-hosted developers, simply substitute the string 'gnu.targets.Linux86' on the line labeled 1. In all cases, you'll need to alter the quoted strings on lines 2 and 3 to respectively reference the installation directories for the C6000 and GCC tools established earlier.

  
Views
Personal tools