Table of Contents Previous topic Next topic
Projects and Workspaces->Creating New Target Family Members
When you select Settings from the Build menu and click on the General tab, you will see a drop down list of Family Members. These family members are defined in a file called TARGET.INI which is located in the INIT directory of the particular target family. You can edit TARGET.INI to add new family members and to edit the defaults associated with existing family members.
Here is a sample TARGET.INI file:
M68020 with M68881
[M68020 with M68881]
All of the family members are listed in the section headed [Targets]. Each family member in this list then has its own section headed by the name of the family member enclosed in square brackets. Eg. [M68332].
When you select a family member for your project, you are in effect selecting a set of defaults that are defined in the section for that family member. The entries in these sections are explained below:
The IniFile entries define the context colouring that is specific to this family member. The C keywords and C preprocessor keywords are hard-coded into the Embedded Development Studio. The C keyword extensions and assembler instructions, directives and options are however defined in a set of initialisation files. For the above example, the M68020 family member supports all of the instructions, directives, options and C keyword extensions that are common to the M68020 and CPU32 and it also supports some instructions that are specific to the M68020. There are therefore two files defining the context colouring - COMMON.INI and 68020.INI. The M68020 with M68881 family member also supports the M68881 assembler instructions and so 68881.INI is specified for this family member. The M68332 has a CPU32 core and so supports the assembler instructions specific to the CPU32 (defined in CPU32.INI) and does not support the M68881 instructions.
The CCommandLine entry defines any compiler command line options that are specific to this family member. The M68020 family member does not have an M68881 coprocessor and so the /N068881 is specified. The M68020 with M68881 family member requires no specific compiler command line options and so there is no CCommandLine entry. The M68332 chip has a CPU32 core and therefore requires the /CPU32 compiler command line option.
The AsmCommandLine entry defines any assembler command line options that are specific to this family member. The M68020 family member does not have an M68881 coprocessor and so the /N068881 is specified. The M8020 with M68881 family member requires no specific assembler command line options and so there is no AsmCommandLine entry. The M68332 chip has a CPU32 core and therefore requires the /CPU32 assembler command line option.
The LinkCommandLine entry defines any linker command line options that are specific to this family member. This allows you to provide options for particular target boards without the need to edit the Advanced Linker Options dialog box. It also allows you to specify multiple /RAM and /ROM options.
The CStartupFile entry defines the file name for the template that should be used if the user requests the New Project Wizard to create a startup file for a C project. All three family members in the above example use the same template C68020.ASM. This template is located in the same directory as TARGET.INI.
The AsmStartupFile entry defines the file name for the template that should be used if the user requested the New Project Wizard to create a startup file for an assembler project. All three family members in the above example use the same template A68020.ASM. This template is located in the same directory as TARGET.INI.
The DefaultNoRom entry specifies that the default option is for code and data to be located in ram. For illustration purposes in the above example we have shown the M68332 with this option. The other family members default to separate code and data and so do not have a DefaultNoRom entry.
The DefaultMinRom entry specifies the minimum rom address in hexadecimal for the family member. For the 8051 target family, this would be equivalent to the minimum code address.
The DefaultMaxRom entry specifies the maximum rom address in hexadecimal for the family member. The 3FFFFF shown in the examples is arbitrary - target boards vary widely in the way their memory is arranged. For the 8051 target family, this would be equivalent to the maximum code address.
The DefaultMinRom entry specifies the minimum ram address in hexadecimal for the family member. For the 8051 target family, this would be equivalent to the minimum xdata address.
The DefaultMaxRam entry specifies the maximum ram address in hexadecimal for the family member. For the 8051 target family, this would be equivalent to the maximum xdata address.
Specifically for the 8051 target family and so not shown in the above example, the DefaultMaxIRam entry specifies the maximum idata address in hexadecimal for the family member.
The DefaultOutputFormat entry specifies the default program file output format for the family member.
The VariantPath entry specifies a sub-path that will be used by the Embedded Development Studio for this particular family member. The sub-path is added to the path for the target family to create the full path. For instance, if the target family is 680X0, the Embedded Development Studio is installed into C:\estudio and the VariantPath entry is:
then the full path will be C:\estudio\680X0\MyTestBoard.
This path can contain the following directories:
The above bin, lib and include directories will be added to the beginning of the PATH, LIB and INCLUDE environment variables passed to any executable run from by the Embedded Development Studio. Therefore additional libraries in C:\estudio\680X0\ MyTestBoard\lib will be found by the linker and used in preference to any in C:\estudio\680X0\lib and additional include files in C:\estudio\680X0\MyTestBoard\include will be found by the compiler and assembler and used in preference to any in C:\estudio\680X0\include.
If a simulator is started, it will look for a file named C:\estudio\680X0\ MyTestBoard\bin\esim.dll which, if present, it will use as a simulator extension.
Also in directory C:\estudio\680X0\MyTestBoard\lib there can be a file called libs.ini. If present, this should contain the names and descriptions of the library files that you would like to be displayed by the New Project Wizard. The format for this file is:
<file name>|<description>|[default/ nodefault]
os.lib|os.lib - os routines|default
adio.lib|adio.lib - a/d conversion routines|default
video.lib|video.lib - video routines|default
i2clib.lib|i2clib.lib - i2c bus routines|nodefault
The Wizard will list them in the order given and if the default keyword is used, it will be selected by default. Of course, these library files themselves should also be in this directory.
Directory C:\estudio\680X0\ MyTestBoard\init will be used by the Embedded Development Studio to store initialisation information particular to the family member. For instance any family member specific custom tools, pre-link commands and post-build commands will be stored here in files with a .cdf extension.