The user can create own targets. All targets are defined in the target definition file Targets.ini. This file has a typical INI-file structure and starts with a section that simply enumerates which targets exist. Each target then has its own section that holds the remaining information, like a short description of the target, the name of the template directory, the names of the template source files, additional commands to perform, etc. The following keywords may appear in a target section:
The name that will appear in the 20-sim C-Code Generation Dialog.
The name of an icon file (.ico) that contains an icon to appear in the 20-sim C-Code Generation Dialog.
The string that will appear in the description field in the 20-sim C-Code Generation Dialog.
Here the path name where the template files for the c-code can be found can be specified. The default name is the target name in the CCode directory of 20-sim. If no full path is specified, the Ccode directory in 20-sim is taken as a starting point.
=filename1; filename2; filename3...
A list of files, semicolon-separated, that specify the files that are generated in the targetDirectory.
This holds the default target directory where the files will be generated. This directory name will appear in the 20-sim dialog box when C-Code is generated and can be overruled by the user.
Determines whether C-Code is generated for the complete 20-sim model, or that a submodel selection is required.
A command which will be executed in the target directory before that the C-Code will be generated.
A command which will be executed in the target directory after that the C-Code has been generated. For example a "make" command can be given to automatically compile the generated code for the specific target.
CRLF (0x0d0a = DOS Standard)
CR (0x0d = Macintosh Standard)
LF (0x0a = Unix Standard)
Enter a number for the kind of newline character that should be used.
This (re)defines the keyword "KEYWORD" and gives it the contents "value". Own keywords can be defined in this manner as well.
will redefine the time variable with the value "someTime"
A valid Targets.ini file (defining three targets) may look like below. The file may also contain specific 20-sim tokens (%MODEL_NAME%) that are described later on.
; Possible targets for 20-sim C-Code Generation
; Generate Stand-Alone C-Code for the complete 20-sim model
description="Use this target when testing the complete 20-sim model as a single process."
; Generate C-Code for a selected Submodel
targetName="C-Code for 20-sim submodel"
description="This is the C-Code as it was generated for a submodel in 20-sim version 3.1"
; Generate C-Code for a dynamic DLL-call to be used in 20-sim
targetName="20sim Dynamic Dll"
description="Generate C-Code for a dynamic DLL-call to be used in 20-sim"
; Generate C-Code for a Simulatink S-Function
description="This generates C-Code for a submodel to be used in Matlab/Simulink"