Targets

Top  Previous  Next

A target is a way of identifying the particular combination of processor type and board manufacturer that is relevant to a compile or link function. Command definitions are held in one or more files named command.dat, and a target helps the command utility to locate the correct one.

 

There are three types of target:

 


Edition

The Diamond edition you are selecting, for example, Sundance, or ANO.


Processor

The type of processor for which a task is to be built. Examples of this could be C6000 or PPC


Edition/Processor

Where the processor or theedition alone does not uniquely define the target hardware, you can give both. For example, Sundance/C6000, Sundance/PPC, or PPC/ANO.

 

The command utility searches the Diamond installation folder structure for command.dat starting at a subfolder determined by the target. If you provide a target, the subfolder will be edition\target\, otherwise it will be edition\. Finding more than one command file within the chosen folder (or nested folders) is considered an error and the utility fails with a message. This means that you must provide a target when you have more than one edition of Diamond installed. If you only have one, you can always omit the target specification.

 

You can supply the target information in two ways: either explicitly in each command, or by adding (or modifying) two lines in the file <3L>Diamond\Defaults.txt:

 

EDITION=Diamond-edition

PROCESSOR=processor

 

For example, assume you have added the following lines to Defaults.txt:

 

EDITION=Sundance

PROCESSOR=C6000

 

All subsequent 3L commands would then be given a default target of -T Sundance/C6000; any explicit target given in the command would override this default.

 

 

Defaults.txt can be useful if you have two or more editions of Diamond installed at any one time.

 

Typical commands are as follows:

 


» 3L C driver.c

Compile driver.c


» 3L C upc.c

Compile upc.c


» 3L T driver

Create driver.tsk by linking against the full library.


» 3L TA upc

Create upc.tsk by linking against the stand-alone run-time library.


» 3L A upc

Create upc.app by running the configurer


» 3L X upc

Execute upc.app with the Windows Server.


» 3L –T Something C y.c

Execute the c command for the processor or edition "Something".