Ginmake Manual
Version 2.89
© General Engine Management Systems (GEMS) Ltd.
Version 2.89
© General Engine Management Systems (GEMS) Ltd.
Ginmake is a conversion utility that takes one or more header files used to create the firmware of an ECU and generates a GIN file that enables tools such as GW to understand the contents of the ECU’s memory.
Ginmake handles H files that are written in C or ASM.
The default output GIN file version is 3.34 for compatibility with widely deployed tools. GIN files are binary files and are not backwards compatible – tools that open GIN files such as GWv4 must be recent to be able to load a specific version of GIN file.
Use -v3.35 to explicitly select version 3.35 when the tools consuming the GIN file support it. Newer supported formats do not automatically change the default.
If you need to build a GIN file for an older GW release, use the -v switch. e.g. For a GWv3 version 3.18 release, use the ‘-v3.13’ option for Ginmake.
Version 3.17+ supports profiles, “old names” and “ignore in compare / convert”.
Table - GIN version compatibility matrix
| GIN Version | Ginmake Version | GW Version |
|---|---|---|
| 3.33 | 2.25 | 4.03.45 |
| 3.32 | 1.87 | 4.02.58 |
| 3.31 | 1.71 | 4.02.43 |
| 3.30 | 1.59 | 4.01.32 |
| 3.29 | 1.56 | 4.01.12 |
| 3.28 | 1.55 | 4.01.09 |
| 3.27 | 1.54 | 4.01.07 |
| 3.26 | 1.53 | 4.01.03 |
Table 2 - GIN version FEATURE matrix
| GIN Version | Features added |
|---|---|
| 3.33 | User defined units. ENUM/OPTLIST, USERSCALAR/OPTUSERSCALAR – Added: DESCRIPTION, ATTRIBUTES, IDENTIFIER, LONGIDENTIFIER, DISPLAYIDENTIFIER. USERSCALAR/OPTUSERSCALAR – Hide from units configuration using ‘!’ name prefix. |
| 3.32 | All objects – Bitmask shift, per-object endian mode. All objects except ENUM/OPTLIST, USERSCALAR/OPTUSERSCALAR – Added: DESCRIPTION, ATTRIBUTES, IDENTIFIER, LONGIDENTIFIER, DISPLAYIDENTIFIER. ENUM/OPTLIST – Define default text if mapping unsuccessful, range. Axes – Added option steps. CCP / XCP extensions. |
| 3.31 | Change audit and digital signatures. |
| 3.30 | 24/32/64-bit values and floating-point raw values. |
| 3.29 | Axes, USERSCALAR - Value formatters. |
| 3.28 | Dynamic object names. |
| 3.27 | All objects except USERSCALAR/OPTUSERSCALAR – Hide in GWv4 using ‘!’ name prefix. Indirect axis tables/parameters. Dynamic units. |
| 3.26 | ECU_STRING. Remote feature upgrade features. |
ginmake 2.07+
Ecudef is a container file that can contain a LZMA compressed GIN file. Such files are typically tens of kB instead of hundreds/thousands.
Ecudef also includes a small uncompressed header to make it possible to identify the ECU it represents quickly without decompressing the GIN file and reading it.
For simulink based gems ECUs, the matching of an ECU identity to a definition file is more complicated than just using the ECU name/version - the model loaded into the ECU can affect the binary layout of memory.
Ecudef can alternatively contain an A2L file for XCP based ECUs. These serve the same purpose as GIN files but are the ASAM standard.
In short, ecudef offers a way to unify GIN / A2L formats, allow rapid file identification and reduce file sizes. In future it will also allow encryption and other augmentation such as inclusion of tab files etc.
Ginmake will produce both a GIN file and an ecudef file. Either can be installed into compatible tools. The installation will compress GIN files to ecudef before placing into the ecu definition file store in order to reduce disk usage.
Command Line:
ginmake [options] [targets … n]
Defines the list of input files (*.h file(s) and/or *.grh file(s))
| Option | Meaning |
|---|---|
| -a | Automatic output gin file name. |
| –a2l | Generate ASAM format A2L file instead of the default GEMS GIN file format. In this mode, the preprocessor symbol __GINMAKE_A2L__ shall be defined while parsing code. |
| –array-alignment=value | Align all arrays to at least this value if the alignment of the underlying type is smaller. |
| –asm-to-c=folder | Convert ASM .h files to C and output files to the given folder. The files will have the same name as the original. The output folder will be created if it does not already exist. |
| -c | Disable checking of names against the names database. REMOVED – see –namecheck. |
| -C | Disable interactive shell for name checking. Unknown names will generate warnings only. REMOVED – see –namecheck-shell. |
| -d[symbol][=value] | Define a symbol. |
| -e[filename] | Write errors and warnings to the file. Overwrites existing file. |
| -f | Force output directory (create folders if they don’t exist). |
| -g[filename] | Update source code based upon supplied template gin file. |
| -i[version] | Install GIN after it has been created. ‘version’ is optional and can be ‘3’, ‘4’ or ‘ALL’. Default is ‘ALL’. This version number corresponds to the toolset that will use the GIN file. Version 3 implies all software before Gwv4. Version 4 handles gin files using a setup file rather than the registry and always copies files to a special Windows ‘application data’ folder (the path of which varies between Windows versions). |
| -l | Disable Automatic Address Alignment |
| –minify[=source.gin] | Create a minified GIN based on a template GIN, default is last built GIN. Use –minify-list to generate a JSON template to use as a starting point. See GIN Minification (Customer GIN creation) for details and examples. |
| –minify-template=templatefile | The template (and path) used to minify, can be a GIN, GWE2 cgt, or a JSON file. |
| –minify-output=path | Output path to the minified GIN. |
| –minify-list=source.gin | Create a minification JSON template from the specified GIN file. See GIN Minification (Customer GIN creation). |
| –minify-list-output=output.json5 | Optional output path for JSON template. If not specified, the path will be generated from the source GIN name. |
| -n | Suppress start-up banner (the copyright message). |
| –namecheck | Enable checking of names against the names database. |
| –namecheck-shell | Enable interactive shell for name checking. Unknown names will generate warnings only. |
| -o[filename] | Output gin file name. %n will be replaced with the ECU name %v will be replaced with the ECU version. Note that the command line and batch files have a special meaning for the % character so you may need to specify these as %%n and %%v. |
| -p[path] | Output path – default is the current working directory. |
| -q | Output path set to GW’s default directory for the GIN created. This takes into account whether ‘Use Ecu Folders’ is set. |
| -r | Output XREF and XDEF definitions for variables in the header files. Files with the same name as the header file, suffixed with ‘.xref’ and ‘.xdef’ will be generated. |
| -s[type] | Source Type (‘C’ or ‘ASM’, default ‘C’). |
| -t | Dump the pre-processor symbol table at the end of the build. |
| –timestamps | Include creation timestamps and automatically generated dated notes. Enabled by default for both GIN and A2L output. |
| –no-timestamps | Disable creation timestamps and automatically generated dated notes, for example when comparing complete generated files in regression tests. Applies to both GIN and A2L output. |
| –treat-duplicates-as-warnings | Duplicate object names of the same type will issue a warning instead of an error. Defaults to an error. Added in version 2.21. |
| -u[code] | Suppress the error or warning as identified by its numerical code. |
| -v | Specify output version (e.g. -v3.11). |
| –verbose | Verbose output (e.g., for linker address map verification) |
| –version | Display only the ginmake version, then exit successfully. No license or input files are required. Other arguments are ignored. |
| –verify-mapfile-gin=ginpath | Verify memory addresses. GIN file (optional). If not provided, and a GIN was also built, the generated GIN is used. See Verification of Memory Addresses. |
| –verify-mapfile=mapfilepath | Verify memory addresses. Linker map file (required), see Verification of Memory Addresses. Use with –verbose for more verbose output. |
| -w | Prompt for overwrite (defaults to always overwrite). This will probably not work if you are compiling within your IDE. |
| -x | Pause at application exit (for debug). |
| -y | Treat warnings as errors. |
| -z[filename] | Write pre-processor output to file (debug). |
| -G[filename] | Generate an ‘automatic’ name for the given gin file. |
| -I[filename] | Install the gin file with the supplied name. |
| -V | Output a list of supported versions. |
A C build:
C:\work\ecu\aem25>ginmake aem2aem.grh -a -sc
This builds the gin using aem2aem.grh and automatically generates the output path and file name (the ‘-a’ switch).
C:\work\ecu\aem25>ginmake aem2aem.grh -a -sc -f -dTEST_MACRO=20 -d"TEST2=(MAPSIZE * 8)"
This defines a macro, “TEST_MACRO” with the value “20” and “TEST2” with the value “(MAPSIZE * 8)”.
An A2L build without timestamps:
1ginmake --a2l --no-timestamps -sC -f -oEIU510.a2l src/cal/cal.hThis omits automatic creation timestamps and dated notes so that they do not
cause differences in full-file regression comparisons. Omit --no-timestamps,
or specify --timestamps, to retain the default timestamped output.
An ASM build:
C:\work\ecu\lan85p>ginmake lan853p.grh -sasm -v3.13 -f -o"lan_test.gin" -q
This builds a gin called “lan_test.gin” in GW’s “Gin Files” directory. If GW is configured to use ECU name directories, then the directory will be adjusted based on the ECU name and version.
The gin file version output will be 3.13 (which is compatible with GW v3.16 r08). The default output for Ginmake v1.0 is 3.15.
If you are using CBE, you should be able to write the error output of Ginmake to cbe.err for use in the IDE:
C:\work\ecu\lan85p>ginmake lan853p.grh -a -sasm -ecbe.err
Once you have generated cbe.err, you can open it in CBE and use
If you are using a windows IDE, you ought to be able to set this up as a custom tool (can be fired from a tool-bar button or an accelerator key) or as a custom build step. This will cause the output of the program to be redirected to the output window of the IDE. Errors can then be easily located by double-clicking on them.
If you are unable to set up the command line appropriately for your IDE, you can write a dos batch file to invoke Ginmake.
Using the command line switch -g[filename], the source code can be updated to reflect changes made in an externally modified GIN file.
The intention is to use the namesdb application to generate a gin file using appropriate categorization. You then use this GIN file as a parameter to the build of your GIN file.
Ginmake will compile the GIN and then compare it with the modified GIN file. Places that were different will be updated in the source code at the end of the compile.
Once this is done, you should attempt a normal compile again to check that everything is OK. In some situations, you may end up with duplicate names or undefined references, which for now will need to be updated manually. The task is at least not as onerous as manual categorization.
It is recommended that you back-up your source code before doing this in case it goes wrong.
Both the code and comment fragments of an H file are used when processing it. Ginmake reads data definitions in the file in order to understand the physical layout of the ECU’s memory.
Comments can be used to describe objects that reside in the ECU’s memory at these locations. Additionally, specific comments can be used to describe other aspects of the ECU such as the endian-ness or Enumerations. For more information, see the “Data Definitions” section.
For an example of the Simulink build process, see Simulink Build Process.
Most firmware requires more than one H file in order to build it. Ginmake therefore needs to handle multiple headers.
This can be accomplished by passing multiple file names at the command line.
It is also possible to pass grouped header files to Ginmake.
A grouped header file is a text file listing the names of the h files (or other grh files) that should be included in the build. This file should be named with a .grh extension (Grouped H file).
Note that the h files are processed in the order of their selection or listing. Erroneous results occur if sections within the code should follow one another but the files are listed incorrectly.
Note also that the pre-processor also maintains its symbol table between included files.
Ginmake can execute several other operations through command line arguments:
Ginmake implements a pre-processor. This allows the definition of symbols from within source code (with #define or EQU).
The pre-processor handles conditionals in the source code, providing that they are not within comments.
As of version 1.22, function-like macros are also supported.
Pre-processor directives that are understood by Ginmake:
1#pragma, #include and #line are ignored at present, and will be stripped from the code before passing onto the compiler.Ginmake defines “_ GINMAKE _” (note the double underscores). This allows you to tailor your source code for your Ginmake build.
When generating A2L, ginmake shall also define GINMAKE_A2L.
It now also defines GINVER_MAJ, GINVER_MIN.
e.g. compiling a 3.23 version GIN file, is equivalent to having:
You can define additional symbols on the command line using ‘-d’ options (see command line arguments section).
For debugging purposes, you can output the pre-processed source to a file using the ‘-z’ option. Additionally, you can dump the pre-processor symbol table using the ‘-t’ switch.
The pre-processor maintains its state between the input files it processes. It is therefore important to ensure that files are included in the correct order to ensure the correct flow of symbol definitions.
Function-like macros may be defined as follows:
1#define MYMACRO(x, y) (x * y)Note that there is no space after the macro name and the opening bracket. If a space is inserted, then the define will simply define a symbol with all of the following text as its value.
Line continuation characters are also supported. This is a backslash ‘' and must be the last character on the line. This is useful if you have a long macro definition and wish to write it on several lines:
1#ifdef __GINMAKE__
2#define LINEAR_INTERP(x, width, x0, x1) (x0 + (x \* (x1 - x0)) / (width – 1))
3#define BILINEAR_INTERP(x, y, width, height, y0x0, y0x1, y1x0, y1x1) \
4 LINEAR_INTERP(y, height, \
5 LINEAR_INTERP(x, width, y0x0, y0x1), \
6 LINEAR_INTERP(x, width, y1x0, y1x1))
7#endifNames are all looked up case-insensitively.
For example, defining a map called “Fuel” could be referenced with the name “fUeL”.
Ginmake parses input source code files and extracts information from comments that are associated with objects in the source code. The syntax of these comments is described in this section.
Definitions can occur in any kind of source code comment, depending upon the source type.
Note that comments are ignored in sections that have been excluded by conditional compilation (see “The Pre-processor” section).
For ASM, comments extend from the first ; character seen on a line to the end of the line.
If the source being compiled is ‘C’ source, then comments can either be traditional multi-line/in-line C style comments /* .. */.
C++ style comments are also supported, which behave in the same way as ASM comments except that the comment begins with the sequence //.
Multiple definitions may be provided for the same address in the ECU. This allows both aliasing of names and it also means that different GIN objects can be set up to control individual bits of an ECU object.
Comments are scanned for definitions that are flanked by square brackets and may contain a comma separated list:
For some definitions, the comma count dictates the information type:
| Type | Number of Commas |
|---|---|
| Options | 8 |
| Channels | 9 |
| Tables | 13 |
| Maps | 18 |
All other definitions have a tag for their first field and can have an arbitrary number of commas:
1// [USERSCALAR,Load Units,kPa,y,,,]
Expressions can be used in data definitions and in source code (e.g. as an array index). Expressions can be contained within pre-processor symbols. e.g.
Within source code, all expressions are considered to be integer expressions. In numerical fields of data definitions, expressions are either integer or floating-point, depending upon the type of the field. For example, the Scalar field of a parameter is integer unless a ‘*’ character is used to indicate that it is floating-point.
Integer expressions can contain the following operators:
In both C and ASM code, ordered by precedence:
| Operator | Description | Associativity |
|---|---|---|
| () | Parentheses (grouping) | left-to-right |
| + - ! ~ | Unary plus/minus Unary logical negation/bitwise complement | right-to-left |
| * / % | Multiplication/division/modulus | left-to-right |
| + - | Addition/subtraction | left-to-right |
| « » | Bitwise shift left, Bitwise shift right | left-to-right |
| < <= > >= | Relational less than/less than or equal to Relational greater than/greater than or equal to | left-to-right |
| == != | Relational is equal to/is not equal to | left-to-right |
| & | Bitwise AND | left-to-right |
| ^ | Bitwise exclusive OR | left-to-right |
| | | Bitwise inclusive OR | left-to-right |
| && | Logical AND | left-to-right |
| || | Logical OR | left-to-right |
In ASM code, the following symbols are predefined by default:
div \
sdiv \
mult *
and &
or |
xor ^
shr >>
shl <<
lt <
gt >
slt <
sgt >
le <=
ge >=
sle <=
sge >=
eq ==
ne !=Floating-point expressions may only contain arithmetic operators – they cannot contain bitwise operators or conditional operators.
Variables in the source code can be followed by data definitions comments. Ginmake can be run against C and ASM code.
Data types recognised by ginmake for C code:
1uint8
2uint8_t
3int8
4int8_t
5uint16
6uint16_t
7int16
8int16_t
9int24
10int24_t
11int32
12int32_t
13int64
14int64_t
15float
16doubleIf the underlying type is float or double then GWv4 will treat the raw value as floating-point.
Data types recognised by ginmake for ASM code:
As of ginmake 1.33, it is possible to use entity references in strings for names etc.
These are very similar to HTML entity references, but they have a different syntax - the ‘&’ and ‘;’ characters are replaced with the $ symbol.
e.g.
< codes for <
This becomes:
$lt$ in ginmake syntax.
Entity references enable us to circumvent the issuse of the DOS and ANSI code pages not entirely overlapping one another and also allows other special characters that may not be present in these codepages.
For example, the capital ‘omega’ symbol is in the DOS codepage, but not in the ANSI codepage. The symbol can now be represented with $Omega$.
If you find that an entity is not supported, you can enter the value of the code-point directly.
e.g. These each code for Capital Letter Omega:
$Omega$
$#x03A9$
$#937$
Be aware that entities are case sensitive. $Omega$ and $omega$ are not the same!
Some values may have their type specified.
This is intended to be used when specifying raw values where there would otherwise be ambiguity over the type that could lead to incorrect values ending up in the output GIN. Additionally for floating-point raw values it is easier to specify them using floating-point values in many cases.
Format:
@Nt:VALUE
Where ‘N’ is the number of bytes in the value (1,2,3,4 or 8).
If ‘N’ is zero, the value is undefined.
Where ’t’ is the type:
i = signed integer
u = unsigned integer
f = floating-point
e.g.
@4i:1234567
@2u:65535
@0u:undefined
Value specifiers can be used in a number of places:
Reference for Ginmake data definition directives and related syntax.
Definitions for these kinds of objects are based upon the number of fields in the definition & do not have a directive name.
Channels were formerly called ‘parameters’ in older versions of Ginmake. They were renamed to avoid confusion with the concept of ‘parameters’ in Simulink and also to better reflect their purpose as a channel for the value of a parameter (or other variable) that is used in the ECU’s memory.
The first 9 fields of each of these types hold the same information.
For tables and maps fields 10 to 14 hold information about the axis or x axis respectively. For maps fields 15 to 19 hold information about the y axis.
For channels field 10 is not currently used and should be left blank.
The following table shows how each field is used:
| Field | Field Name | Description |
|---|---|---|
| 1 | Name | The name of the type. If left blank the associated variable name is used. For Gin versions 3.17+: If the field is preceded with a tilde character ( |
| 2 | Units | The units for the type. If this field contains text in brackets, it indicates a user scalar. For information on user scalars see below. See also section on units: Error! Bookmark not defined. |
| 3 | Scalar | IFF the whole field matches a pre-processor symbol then it shall be replaced (Ginmake 2.35+). This field and the offset field define how the raw value is scaled to the given units. The scalar (m) and offset (c) (obtained from field 4) are applied to the raw value using m*raw + c. If this field is left blank, m is set to 1. If the field is a value, m is set to value/256. For example, if the value is 100, m is set to 0.39. If the field is a value preceded by a ‘*’ character, m is the real value following the ‘*’. The field may alternatively use a type specifier, to provide a multiplier of a specific type. If a type specified field is used, this may be followed by a ‘/’ and an additional type specified value to be used as a divisor. If the field is a value preceded by the ‘/’ character, m is the real value following the ‘/’ but the real value is calculated as m / (raw + c). For example, /5859 would result in real=5859/(raw [+ offset]). If the resulting denominator is zero, then GWv4 will display ‘Error’ in parameter/enumerations. If this field is defined enum(x), x refers to the name of an enumeration (see ENUM). It can also be used in conjunction with a multiplier (allowing enumerations to be used on mask-shifted values). e.g. …,64 ol(PullUpList),… Legacy: instead of ’enum’, the field may also use ‘ol’ for backwards compatibility. Additionally, this field may be defined as OLx where x is the index of the enumeration in the GIN file, starting at 1. Index based enumeration lookup is easily broken and therefore discouraged. A text string in brackets indicates a function table. See below for details on function tables. If this field is ‘c’, the type is a parameter comm code. |
| 4 | Offset | IFF the whole field matches a pre-processor symbol then it shall be replaced (Ginmake 2.35+). The value of this field defines c and is an integer value. If the field is blank, c is set to 0. If the field is a value preceded by a ‘*’ character c is the real value following the ‘*’. Alternatively, this may be a value with a type specifier. |
| 5 | Read/write | IFF the whole field matches a pre-processor symbol then it shall be replaced (Ginmake 2.35+). If this field is set to w or W the type can be written as well as read through the serial port. If the type is an option and the field is set to o or O the option is also writeable. If the field is r, R or left blank the type is read only. If the type is a parameter, a value of ’m’ or ‘M’ followed by either a numerical index or a name reference in brackets indicates a multiplicative programmable parameter. If an ‘a’ or ‘A’ is used instead of ’m’, then it is an additive programmable parameter. e.g. ‘m5’ indicates that the parameter modifies the fifth map. ’m(Fuel)’ indicates that the parameter modifies the map named ‘Fuel’. Gin versions 3.17+: This field may additionally contain a profile reference (see below about Profiles). The format for this is a ‘p’ character followed by the name of the profile in brackets. This can be added in addition to one of the above values and should be separated with a space. It can feature before or after the r/w value. It is possible to assign the object to multiple profiles if required. This is accomplished by separating the profile names by ‘;’ characters: e.g. [..,m(Fuel) p(Engine),,,…] or [..,r p(Engine;Fuel),,,…] Gin versions 3.22+: This field may additionally contain a category reference (see below about Categories). The format for this is a ‘c’ character followed by the unique identifier of the category in brackets. This can be added in addition to one of the above values and should be separated with a space. It can feature before or after the r/w value. It is possible to assign the object to multiple categories if required. This is accomplished by separating the category identifiers by ‘;’ characters: e.g. [..,m(Fuel) c(fuel),,,…] or [..,r c(fuel;accel),,,…] |
| 6 | 2’s complement | If a ‘2’ or a ‘-’, the location holds a 2’s complement value. If a ‘+’ or empty, the location holds a positive value. Alternatively, the field can contain a type specifier to indicate/override the underlying raw type (e.g. @4u:) |
| 7 | Floating-point | If an ‘f’ character is specified, the scaled value is displayed as a floating-point value. If ‘i’ or empty, the scaled value is displayed as an integer. |
| 8 | Bitmask | IFF the whole field matches a pre-processor symbol then it shall be replaced (Ginmake 2.35+). If this field is empty, all bits of the location are used to calculate the value. A value indicates a bit mask showing which bits should be used in calculating the value. Any bits used must be adjacent. A single bit is displayed as either ON or OFF. Note that the bit mask may be defined using a shift expression if desired: e.g. 1 « 2 1 shl 4 If the value is signed, then the mask will sign extend the top bit. Gin version 3.32+ May define a shift to be applied to the value before the mask and before any scaling. This is part of the conversion from ‘EcuRaw’ => Native ‘Raw’ (in conjunction with Endian Mode + Mask). e.g. SHL(10) SHR(4) May define a Bit Extraction similar to DBC: BIT(offset|count) BIT(offset) BIT(offset) is equivalent to BIT(offset|1) Bit extraction is performed after any endian swapping and is therefore relative to the Least Significant Bit (LSB). e.g. BIT(8|4) will extract 4 bits that are 8 bits offset from the LSB. The result will be shifted down. i.e. ((EcuRaw » 8) & 0x0F) |
| 9 | Base/Format | IFF the whole field matches a pre-processor symbol then it shall be replaced (Ginmake 2.35+). If ‘b’ the scaled value is displayed in binary notation (0bxxxxxxxx). If ‘h’ or ‘x’ the scaled value is displayed in hexadecimal notation (0xXXXX). If ’d’ or blank, the scaled value is displayed in decimal. Note that binary and hexadecimal do not display to floating-point. This field may also be a format string to control the display of decimal places. See Value Formatting. To specify formatters for axes, this field can be a semi-colon delimited list of formats. The first item being the format for the map/table itself, and subsequent fields being for the x and y axes, respectively. |
| 10 | Axis Channel | This is the name of the parameter used for the axis of a table (or x axis of a map). In some tables (e.g. battery compensation table) the parameter is used to determine the current position in the table. In others (e.g. speed table) the parameter is used by the maps that use the table as their axis. This name may also be the name of a table used for the axis of a table or map (as referred to in the speed table example). Note tables take precedence over channels. You should avoid duplicating names of channels, options and tables for values that are referenced by this field. If such a conflict exists, Ginmake will warn you. If the field is encapsulated in P[…], then this corresponds to an option that defines the PARAMETER to use (i.e. a dynamic, ‘indirect parameter’). The option may be an enumeration containing parameter names or it may be a comcode option. e.g. P[Channel Selector X] If the field is encapsulated in T[…], then this corresponds to an option that defines the TABLE for the axis. The option may be an Enumeration style option that contains the name of the tables that can be used. Of the field is an indirect table/parameter and it refers to an Option with an Enumeration, the enumeration names will be checked for matching table/parameter names. If there is an entry for an unknown item, Ginmake will issue an error. |
| 11 | Axis Units | The units for the axis (or x axis of the map). (May also be user scalar units as per field 2.). Defaults to an empty string. |
| 12 | Steps | The number of steps in the table (or x axis of the map). Defaults to 1. Alternatively, this may be the name of an option if a table has not been used for the axis parameter. The name may optionally be placed in brackets. |
| 13 | Start | The axis value of the first step. This is an integer value. If preceded by a ‘*’ the subsequent real value is the first step value. Defaults to 0. Alternatively, this may be the name of an option if a table has not been used for the axis parameter. The name may optionally be placed in brackets. |
| 14 | Offset | The offset of each subsequent axis site from the start axis value. This is an integer value. If preceded by a ‘*’ the subsequent real value is the offset. Defaults to 1. Alternatively, this may be the name of an option if a table has not been used for the axis parameter. The name may optionally be placed in brackets. |
| 15 | Y Axis Channel | As field 10 for maps. |
| 16 | Y Axis Units | As field 11 for maps. |
| 17 | Y Steps | As field 12 for maps. |
| 18 | Y Start | As field 13 for maps. |
| 19 | Y Offset | As field 14 for maps. |
To create the desired object, you must use the correct number of fields required for that object. There should be a minimum of 9 commas for a parameter and up to 18 commas for maps. Unused fields can be left blank like the two channels and a map example below:
1FMOD DS.B 1 ;[Fuel mod,%,100,,W,2,f,,,]
2SPEED DS.W 1 ;[Engine Spd,rpm,100,0,r,+,i,,]
3FMAP DS.B MAPSIZE ;[Fuel,VE,,,o,+,i,,,
4 ; Throttle,,MAPLSTP,0,10,
5 ; Engine Spd,rpm,MAPSSTP,800,400]
6
7; Note that 'Throttle' and 'Engine Spd' must be defined as channels.Options may be defined as ‘parameter comm codes’. Such options are always words, and their value defines the comm code of a parameter. The appropriate parameter is looked up and its name displayed as the value. Such objects must be large enough to hold a comm code value.
An option displaying a parameter comm code is defined by setting ‘c’ in the scalar field.
Many objects can use a value format in order to control how values are displayed (decimal places, hex etc).
The following table shows the standard formatting characters that can be used:
| Character | Description | Notes |
| X or x | Display in hexadecimal | Must be first character in format |
| B or b | Display in binary | Must be first character in format |
| - | Force leading sign character | e.g. +5.3 is displayed instead of 5.3 |
| # | Indicates an optional digit | e.g. ### gives 93 |
| 9 | Indicates a required digit | e.g. 999 gives 093 |
| 5 | Round to nearest 5 | e.g. ##5# gives 2450 instead of 2448 |
| 0 | Round to nearest 10 | e.g. ##0# gives 2400 instead of 2448 |
| . | Indicates position of decimal | e.g. #.## rounds to 2 decimal places. |
Supported by Ginmake v1.74 and later.
[_DEFINE,name]
[_DEFINE,name,value]
Define pre-processor symbols via ginmake comments instead of in the source code itself.
e.g.
Supported by Ginmake 1.32 and later
These are used for comment-based conditionals. If the statement is false, then the rest of the comment line is not parsed.
e.g.
This will only include Inj Advance Mod if the OMEX symbol has a value of ‘2’ or equates to hat value. Any arithmetic or relational operators may be used in the expression.
_IFDEF evaluates to TRUE if the symbol in the following field is defined.
_IFNDEF evaluates to TRUE if the symbol in the following field is NOT defined.
Supported by Ginmake 1.42 and later
Has the same effect as _IF, _IFDEF and _IFNDEF. The difference is that it only applies to the next object definition (excluding any more pre-processor definitions and/or _WARN directives).
Supported by Ginmake 1.41 and later
Supress output of a warning for the next object definition.
e.g.
1// [_WARN,4017][expression generating warning 4017...]
[ADDROFF,n]
Similar to [SIZEOF]
Causes the base address of the next defined object to be adjusted.
For example, if there is a word value defined:
1USERMSG1 DS.W 1 ;[User Message,,,,r,,,,H,]A 8bit alias of the 2nd byte may be added:
Following use of the ADDROFF override to create an object, the override is reset. The override also does not survive until the next source code definition (e.g. the next DS.B).
Ginmake 2.62+
[ALIAS,name,alias_name]
[ALIAS,name,alias_name,type]
Clone object named ’name’ of type ’type’ with new name ‘alias_name’. Type field is optional.
Note that for more control, the following is now also possible in ginmake 2.62+, to create a new object at the same location as the EXTEND item:
1// [EXTEND,TIC 01 Time][TC1,,,,r,+,i,,,]
Supported by Ginmake 1.24 and later, Gin file version 3.21
[ATTRIBUTES,attribute1,attribute2=value2,...]
Allows the object to be tagged with various strings. These will be used to convey additional information about the object.
One such attribute is ‘fuel’. This allows maps that are not called ‘fuel’ to be interpreted as fuel maps and provide the user with additional fuel map specific options.
Example:
1// [Fuel1,VE,,,o,+,i,,,rpm Breakpoints,rpm,MAPSSTP,800,400,Load Breakpoints,(Load),MAPLSTP,0,10]
2// [ATTRIBUTES,fuel,another one,another two]
Extension in Ginmake 1.33 and later, Gin file version 3.23
Attributes can now be given values using assignment:
// [ATTRIBUTES,ChannelName = Vehicle CAN]
In-line expression evaluation is also possible by enclosing the expression in {…} symbols. This includes expansion of pre-processor symbols and function-like macros:
1#define CAN_CHANNEL(x) CAN x + 1If a ‘{’ character is required in the evaluated text, enter it twice:
Note: can channel names should be defined using the ‘META’ tag, along with ‘CAN_CHANNEL_NAME’.
Small increment and large increment
A problem when using 16bit tables, maps, options etc is that incrementing the value can have a very small effect on the object. You can specify the large/small increment used by Gwv4 by using the large_inc and small_inc attributes:
1[ATTRIBUTES,small_inc=16,large_inc=256]The default supplied by gw is a small_inc of 1 and a large_inc of 16.
| Attribute | Meaning |
|---|---|
| _equ | EQU name preceding the definition, automatically generated by ginmake from injected EQU_ANNOTATION directives. |
| _f | Filename index and line reference, automatically generated by ginmake. |
| _v | Variable name, automatically generated by ginmake for display in descriptions view for GEMS staff. |
| analog_index | Indicates that an option specifies an analog input channel number. |
| axis_x_param_cc | The value of this attribute is given the name of an option that holds a comcode for looking up the X axis parameter. Currently only for tables (note that tables can be used as map axes though). |
| adjust_by_percentage | For log maps, this is the default value for the ‘Adjust by Percentage’ setting in the ‘Apply Corrections’ dialog. |
| bool | Object represents a Boolean value (zero or non-zero) |
| can_id | Indicates that this value is a CAN ID and GW should present a CAN ID editor for the field. The Extended bit is represented by 0x20000000. The ID itself is right justified. This is only available in GW version 4.03.36+ so it is recommended to set the field to display in hex for prior versions. |
| convert_lerp | During calibration conversion, does a real->real interpolated site conversion (the default). |
| convert_raw | During calibration conversion, does a copy of raw values as-is, with no interpolation. empty sizes will be set to zero. |
| convert_static | During calibration conversion, does a real->real (scaled) site conversion, with no interpolation. empty sizes will be set to zero (raw). |
| correction_mul | For log maps, this is the default value for the ‘Multiplier’ setting in the ‘Apply Corrections’ dialog. |
| error_as_percentage | For log maps, this is the default value for the ‘Error as Percentage’ setting in the ‘Apply Corrections’ dialog. |
| direct_cal_disable | Simulink builds: disables ‘direct calibration access’ for this object or memory segment. If set to -1 then the setting is inherited from the parent segment (allows EXTEND to effectively un-set the attribute). |
| enable_error_as_percentage | Enables error_as_percentage property in Apply Corrections. |
| fuel | Indicates that the associated object is a fuel map. |
| input_name | Name of an input. E.g. for Analog 08 this may specify “Air Intake Temperature”. |
| inputs | List of object names that are inputs to this object for the purposes of generating an audit graph |
| invert_lookup | Inverts the parameter position lookup on table objects. The parameter position is based upon the values in the table as opposed to the values in the axis. For tables that are used as table axes, this is done automatically. This may specify a Boolean value (0, 1, true, false) to override the automatic value. |
| large_inc | Value of this attribute defines the large raw increment in Gwv4 when the SHIFT+/- keys are used. |
| pullup | Pullup value, in ohms. This must be an integer value – i.e. use 4700 instead of 4K7. Used for analog inputs. If specified, when using Sensor Calibration view with conversion from Ohms to table input voltage, the pullup field can be auto-populated. |
| outputs | List of object names that are outputs of this object for the purposes of generating an audit graph |
| sl_prefix | Equivalent to [SL_PREFIX] directive. |
| small_inc | Value of this attribute defines the small raw increment in Gwv4 when the +/- keys are used. |
| stress_test_override | When running a calibration stress test, this value is not randomised and is instead written with its default value (see VALUES tag). GEMSEC is automatically handled in stress tests. |
| target_map | For log maps, specifies a physical map that should be used for the target. |
| swt_in | Indicates that this option should present a switch selector (or not) – specify 1 or 0, with the default being 1. |
Conversion directives will be applied if either source OR destination have the attribute. convert_static will take preference over convert_raw. convert_lerp will take preference over convert_static.
For some conversions, these hints will be ignored (Enumeration or ComCode targets).
Categories are supported in version 3.22 Gin files.
[CATEGORY,<identifier>,<display_name>,[<parent>]]
| identifier | Unique identifier referring to the category |
| display_name | Name to be displayed in GWv4 |
| Parent (optional) | Identifier of the parent category. This allows tree structures of categories to be defined. |
A category generates a tag that is referenced by other objects in the GIN file. In Gwv4 objects are added to categories in the views tree to make the user interface more logical.
Categories can be applied to options, tables, parameters and maps in the read/write field with a ‘c(
See also: Option, Parameter, Table and Map definitions, Read/Write field
Example
1[CATEGORY,fuel,Fuel]
2[CATEGORY,fuel_accel,Accel,Fuel]
3[CATEGORY,ign,Ignition]
4[CATEGORY,ign_accel,Accel,Ignition]
5[CATEGORY,another,Another]
6[CATEGORY,yet_another,Yet Another]…
1[Fuel,VE,,,o **c(fuel;another;yet_another)**,+,i,,,Throttle,,MAPLSTP,0,10,Engine Spd,rpm,MAPSSTP,800,400]Supported by Ginmake 1.33 and later, GIN file version 3.23.
[CONNECTION,type[,param1,param2,...]]
Connection definitions give GW a hint as to how the ECU should be connected to. The idea is to be able to provide a better user interface if it appears that the user is having trouble connecting to the ECU. It is mandatory to have at least one connection defined in GIN files of version 3.23 or later.
The connections will be checked when connecting to the ECU in Gwv4. If there is not a connection in the GIN that matches, then GW will warn you.
For now, these are the definable connection types. The third parameter of the COM connection definition is the baud rate (mandatory for COM connections only).
1// [CONNECTION,COM,38400]
2// [CONNECTION,FTDI]
3// [CONNECTION,LIBUSB]
4// [CONNECTION,HID]
5// [CONNECTION,MASS] // Mass storage device
The CONNECTION definition is just a list of strings and there is no checking on the actual values performed by ginmake. This is to make it easily extensible in the future.
Notice that only the COM port connection type requires a baud rate. In the future the other connection objects may acquire additional parameters.
Supported by Ginmake 2.38 and later.
[DELETE,name]
[DELETE,name,type]
Extend an existing item of the given name and, optionally, type in case of ambiguity.
e.g.
Supported by Ginmake 1.33 and later, GIN file version 3.23.
[{object}][DESCRIPTION,text]
Tags a description to the preceding object. This will be used in Gwv4 for extended information (e.g. tool tips for options).
See also XMLDESCRIPTIONS.
1// [Fuel,....] // fuel map
2// [DESCRIPTION,Configures the amount of fuel injected at different load and speed values]
In ginmake 2.37 this can be used in conjunction with EXTEND to place descriptions in a separate file.
1// [EXTEND,Fuel,map] // fuel map
2// [DESCRIPTION,Configures the amount of fuel injected at different load and speed values]
Text may include ginmake style character entities (see Appendix A).
HTML is supported in this field so must be appropriately escaped.
If this field is being generated from Simulink object properties or DBC, prefix with to prevent automatic escaping.
Ginmake 2.62+
[{object}][DIRECT_CAL_DISABLE]
For Simulink builds, if direct_cal_access is enabled, this post-fix directive disables direct access for the associated object.
The controls the way in which get/set functions are generated for the object. If direct_cal_access is enabled, then by default get/set functions will be generated that access the calibration memory / variable directly. This directive forces the use of XCU_memory_xx functions instead for the associated object.
In some cases, it may be preferred for some items to be read/written via the XCU_memory_xx functions instead on a case-by-case basis, even when direct_cal_access is enabled. This directive allows this to be done without having to disable direct_cal_access for the whole build.
e.g.
1uint16_t object; // [My Thing,…][DIRECT_CAL_DISABLE]
This is a shorthand equivalent to:
1uint16_t object; // [My Thing,…][ATTRIBUTES,direct_cal_disable=1]
Supported by Ginmake 2.37 and later, Gin file version 3.22
[{object}][DISPLAY_IDENTIFIER,identifier]
Sets the ‘display identifier’ value on the prior object (as in Asam A2L DISPLAY_IDENTIFIER)
Supported by Ginmake 1.53 and later, Gin file version 3.26
[ECU_STRING,identifier]
Adds an array of bytes that is readable from the ECU as a string.
e.g.
1example ds.b 6 ; [ECU_STRING,Example]Adds a string that is 6 characters long and identified by the name ‘Example’.
Ginmake version 1.48.0+ supports ~ and ! characters as a name prefix, as for options, tables, maps etc for ignoring in conversions / hiding from the user.
e.g.
1example ds.b 6 ; [ECU_STRING,!Example][ENUM=name,string1,value1,string2,value2...]
[ENUM,string1,value1,string2,value2...]
[OPTLIST=name,string1,value1...]
An enumeration (formerly ‘Option List’) allows a value to be represented by a string of text. Within GW the type (typically an option) can be modified by selecting a string from a pull-down list of strings within a combo box.
An enumeration is typically defined at the beginning of a file after a comment. A square bracket followed by the text ‘ENUM’ (or, for backwards compatibility, ‘OPTLIST’), any number of subsequent value/string pairs and a terminating close square bracket define an enumeration. For example:
If an enumeration has no entries, anything defined to use it will not use it. This allows an enumeration definition to be undefined (typically for debugging) by placing the ‘]’ after the ENUM:
1;[ENUM], 0,OFF,1,ON,2,UNDEFINEDThis creates an empty enumeration definition in the GIN file in order to maintain the index numbering. This is useful if you are using the legacy index based “ol
Enumerations may be tagged with an identifier to allow name-based lookup by other types. This is highly recommended because it reduces hard coding and eases code maintenance:
1;[ENUM=Troolean,0,OFF,1,ON,2,MAYBE]Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.
GIN file versions 3.32+:
Normally if the underlying value does not map to a value in the enumeration definition, then the Calibration software will display “-”. It is possible to define this ‘default’ text by including “?” in one of the value entries or as its own entry:
[EQU_ANNOTATION,name,value]
Causes the next item to be given an “_equ” attribute for display of this metadata in the GWv4 descriptions view.
Manual addition of these directives is not recommended – ginmake will automatically insert them during the pre-processing pass of ASM sources. See ticket #1526.
Supported by Ginmake 2.37 and later
[EXTEND,name]
[EXTEND,name,type]
Extend an existing item of the given name and, optionally, type in case of ambiguity.
e.g.
1// [EXTEND,Engine RPM,channel][RENAME,Engine Speed]
Function Tables are supported in v1.12+.
[FUNCTBL, FUEL, <oorlowreal>, <oorhighreal>, <oorlowraw>, <oorhighraw>, <count>, <raw0>, <real0>, <raw1>, <real1>, ...., <rawcount-1>, <realcount-1>]
When defining a parameter, option, table or map, the scalar function is defined as a function table by specifying a name in brackets in the scalar field. For example:
1uint16_t FUELLVL; // [Fuel level,l,(FUEL),,r,+,i,,]
The first label is always FUNCTBL and the name of the function table follows.
The raw (integer) value to which a real value is converted if it is lower than the lowest value in the table (oor meaning Out Of Range).
The raw (integer) value to which a real value is converted if it is higher than the highest value in the table (oor meaning Out Of Range).
The real value to which a raw value is converted when it is lower than any raw value in the table.
The real value to which a raw value is converted when it is higher than any raw value in the table.
The number of entries in the function table and is succeeded by the raw and real values of each entry.
Note that function tables must be continuously increasing or decreasing.
Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.
Supported by Ginmake 2.04 and later, Gin file version 3.21
This is the same as VALIDRANGE except that values are specified in real (physical) values instead of RAW internal values. Values will be converted to RAW by ginmake and stored in the GIN archive in the same way as VALIDRANGE.
e.g.
1// [Rad Fan 1,,OL3,,o,2,i,,][HARDLIMITS,0,150]
LIMITS and HARDLIMITS can be combined:
1// [LSB_FIRST][PT3,,,,,,f,,,][LIMITS,0.0,100.0][HARDLIMITS,0.0,100.0]
For A2L output, HARDLIMITS sets EXTENDED_LIMITS on calibration objects
(CHARACTERISTIC, AXIS_PTS and AXIS_DESCR). An omitted bound uses the
corresponding data type limit after scaling. VIEWRANGE or LIMITS can independently
set the normal display limits.
A2L does not support EXTENDED_LIMITS on MEASUREMENT objects. Use VIEWRANGE
or LIMITS to set their display limits. Applying HARDLIMITS or VALIDRANGE to a
measurement when generating A2L issues warning W4038. Suppress this warning
independently with -u4038.
Supported by Ginmake 2.37 and later, Gin file version 3.22
[{object}][IDENTIFIER,identifier]
Sets the ‘identifier’ value on the prior object (as in Asam A2L IDENTIFIER)
Supported by Ginmake 2.27.
[IDENTITY,name[,value[,nameN,valueN]]]
Adds additional fields to the ECU identity JSON that is embedded in the GIN file. Multiple key-value pairs can be specified.
Multiple IDENTITY directives may be specified.
e.g.
1// [IDENTITY,GlsVersion,"01V00"]
Indicates the supported GLS (GEMS Logger Setup) version (see GEMS doc 104172)
The JSON is output to a file ‘ginmake.identity.json’.
Ginmake 2.39+
[INCLUDE_A2L,<filename>]
Filename is absolute or relative to the file being processed.
When exporting A2L files, this command shall parse the supplied file (syntactically, not semantically) and then load that DOM directly into the MODULE node being exported.
At present, this will result in loss of formatting / comments from the source file.
There is some possibility that this could result in unwanted conflicts, so some care is needed to avoid that.
Supported by Ginmake 1.75.
[INPUTS,name1[,nameN]]
[OUTPUTS,name1[,nameN]]
List inputs and outputs of this object (e.g. a parameter name that represents the output of a map). This may in future enable automatic Audit graph generation and may also be useful for A2L export. These definitions generate inputs/outputs ATTRIBUTES.
Supported by Ginmake 1.92 and later, Gin file version 3.21
This is the same as VIEWRANGE except that values are specified in real (physical) values instead of RAW internal values. Values will be converted to RAW by ginmake and stored in the GIN archive in the same way as VIEWRANGE – i.e. they will not take into account any dynamic scaling.
e.g.
1// [Rad Fan 1,,OL3,,o,2,i,,][LIMITS,0,150]
or
1// [LSB_FIRST][PT3,,,,,,f,,,][LIMITS,0.0,100.0]
[LITTLEENDIAN]
By default, ECUs are assumed to be big endian. To define an ECU as little endian simply add the line:
..anywhere in the code to be processed. ECUs are always little or big endian and cannot be mixed.
The logging memory size can be specified for gin files of version 3.18 and greater. Often the ECU defines this in a parameter (“Log Size”) which is not available off-line. In the past it has been assumed that the logging memory size is 512*1024 (originally hard coded for AEM) when calculating the run time in GW.
The size can be defined as follows:
1// [LOGGINGSIZE=1024 * 1024]
The value is specified in bytes.
Values can be defined in hex, decimal or binary with appropriate prefixes (0x or $ for hex, 0b or % for binary and no prefix for decimal).
The value may be an expression containing pre-processor symbols (#defines and equates) and can use mathematical symbols (see the “expression evaluation” section for more details).
The value and expression arguments use 64bit integer arithmetic with the final value stored as a 64bit value in the gin file.
Log Maps monitor and store a pre-defined parameter into the map at sites corresponding to those of a base map. For example, a Lambda log map would log the lambda parameter, based upon the fuel map. As the load and speed approach a particular site in the fuel map, the value of lambda is logged into the lambda log map at the corresponding site. As more values of lambda are collected for that site, the site value is averaged out. As engine load and speed changes, the log map is built up to show how lambda changes across the entire load and speed map.
The weight of a site is the number of data points collected to produce the average value. Setting the weighting to a low value (such as zero) will give higher priority to new data coming in. Setting it to a higher value will reduce the priority of new data coming in. This can also be used to initiate auto mapping for selected sites as auto mapping will not start for a site until the weighting has exceeded a certain value.
| Field Name | Definition |
|---|---|
| LOGMAP | This is entered as is, and defines the values as a log map. |
| Name | Name of the log map. |
| Reserved | Leave blank. |
| Map Base | Map Name Reference – This must be provided, and indicates the base map May be left blank |
| Log Parameter | Parameter Name Reference |
| Remove Time (ms) | Integer – Time that a site must be located for before values are logged. |
| Weight Time (ms) | Integer – Time over which a linear significance value is applied to a recorded value. |
| Filter Limit (%) | Integer – Readings that deviate from the most significant recorded value exceeding this percentage will be dropped. |
| Create Mod Map | Boolean – may be 0, 1, ’true’ or ‘false’. Generates an additional map that can be used to enter a desired value for the parameter being logged at a particular map site. This map is used to perform auto mapping. |
| Site Accuracy (%) | Integer – affects the weighting given to recorded values depending upon how close to the centre of a site the current axis positions are. |
| 100% weighting (%) | Integer – affects the shape of the site accuracy filtering. |
| Filter Type | “bell” or “proportional”, defaults to “proportional” |
| Secondary Filter Parameter | (Parameter Name, blank for no secondary filtering) |
| Secondary Filter Minimum | Real – cutoff point for the secondary parameter, below which logging will not take place. |
| Secondary Filter Maximum | real– cutoff point for the secondary parameter, above which logging will not take place. |
| Tertiary Filter Parameter | (Parameter Name, blank for no tertiary filtering) Pls note that this feature is not yet supported in GW and is not stored in v3.15 GIN files. |
| Tertiary Filter Minimum | Real – cutoff point for the tertiary parameter, below which logging will not take place. Pls note that this feature is not yet supported in GW and is not stored in v3.15 GIN files. |
| Tertiary Filter Maximum | real– cutoff point for the tertiary parameter, above which logging will not take place. Pls note that this feature is not yet supported in GW and is not stored in v3.15 GIN files. |
| Max absolute change (+) | specifies the constraints imposed on the change value. When auto mapping is started, GW takes a copy of the base map in its original state. The base map is not changed by more than the absolute or percentage change from its original state. |
| Max % Change (+) | |
| Max absolute change (-) | |
| Max % Change (-) |
Example:
1[LOGMAP,Lambda,,Fuel,Lambda,200,400,10,true,75,25,proportional,,,,,,,10,50,10,50]Generates a Lambda log map. This has the Fuel map as a base, logging against the Lambda parameter. There is no secondary/tertiary parameter filtering in this example.
Supported by Ginmake 2.37 and later, Gin file version 3.22
Sets the ’long identifier’ value on the prior object (as in Asam A2L LONG_IDENTIFIER)
Supported by Ginmake 1.33 and later, GIN file version 3.23.
Used to define additional, arbitrary ‘meta’ information in the GIN file.
Ideally, this should take the format:
[META,name,other stuff..n]
Valid definitions:
Gives a human readable name for the CAN channel
[META,CAN_CHANNEL_NAME,1,Vehicle CAN]
[META,CAN_CHANNEL_NAME,2,Engine CAN]
Identifies pages in the page table that can be read even when the ECU is secured.
This allows users access to some ECU areas whilst keeping other areas of the calibration locked.
[META,UNSECURE_PAGES,0]
[META,UNSECURE_PAGES,1,3,4]
Page numbers start at ZERO.
Indicates the type of internal logging format. See GEMSCOM protocol specification for more details on the types of logs. This meta tag will affect the internal logging setup dialog.
[META,LOG_TYPE,linear]
[META,LOG_TYPE,normal]
[META,LOG_TYPE,v0.06]
[META,linear_log] - equivalent to [META,LOG_TYPE,linear]
[META,HAS_CAN_TELE_FIXED_VALS]
[META,HAS_SERIAL_TELE_FIXED_VALS]
These flags indicate that CAN telemetry and Serial Telemetry, respectively, can have ‘fixed’ values in the list of options. Fixed values insert fixed byte values into the output stream. Fixed values are identified by comcodes with the top byte set to 0x7F.
e.g. 0x7F23 instead of an actual parameter comcode would output 0x23 at the specified telemetry stream position.
By specifying these flags, GWv4 will identify fixed values and will additionally add a method for entering fixed values.
[META,BLOB,<type>,<index>,<max_size>];
Identifies that there is a blob (binary large object) of a particular type. Each blob must have a unique index number (used by the protocol for reading & writing blobs) and a maximum size, in bytes. Type names prefixed ‘gems_’ are reserved and must be specified in this document.
e.g.
[META,BLOB,gems_log_setup,0,262144];
Note that blobs are required to contain the size of the data as a 4-byte little-endian integer at the start of the blob. If this value is 0 or FFFFFFFF then the blob is considered as being empty.
gems_log_setup Setup file for ‘full featured’ internal data logger setups.
[META,BLOB_RW_SIZE,<[connection]>,<max_read_size>,<max_write_size>];
Indicates the maximum size that may be read/written in a single blob read/write gemscom command (see GEMSCOM protocol specification document).
The size identified is the maximum number of bytes that may be in the data portion of the command, excluding the command header/checksum overhead.
The
Indicates that coprocessor firmware can be uploaded to this ECU.
Note that the coprocessor .bin file must contain a string that says:
“GEMS FIRMWARE”, followed by the name/version of the firmware which will be presented to the user.
Indicates that this GIN file is for a CoPro bootloader firmware image.
Alternatively, if the ECU name ends with ‘CPB’ then the GIN is considered as being CoPro bootloader.
Indicates that this product has a minimum CoPro firmware version recommendation. This is not a hard requirement but GW may indicate to the user that an upgrade of the CoPro firmware is recommended.
Set to ‘1’ to explicitly enable comms read/write optimizations. Set to ‘0’ to disable them.
Some ECUs have bugs that mean that joining adjacent reads together to reduce bandwidth can result in incorrect data being read from the ECU due to the CoPro using internal byte-swapping.
This was fixed in EM80_M but there are many versions of EM80/GDI80 CoPro etc in the field that have this bug.
GWv4 will automatically disable read optimizations on EM80, GDI80 unless the CoPro version is >= 02x01.
Affected ECUs:
For new ECUs that use lower versioned CoPro that does not have this issue, explicitly set COMMS_READ_OPTIMIZE / COMMS_WRITE_OPTIMIZE to ‘1’ in the GIN file.
Ginmake 2.39+. When exporting A2L format ECU definition file, this inserts ECU_ CALIBRATION_OFFSET into the MOD_PAR section.
Ginmake 2.39+. When exporting A2L format ECU definition file, this inserts EPK into the MOD_PAR section.
e.g.
[META,EPK,{REV_NAME}{REV_VERSION}]
Ginmake 2.39+. When exporting A2L format ECU definition file, this inserts ADDR_EPK into the MOD_PAR section.
There is an alternative to using this META string and that is to define an EPK ECU_STRING. If defined, the address of the EPK ECU_STRING object shall be used.
If defined, causes GEMS Reflash tool to disable the ‘clear’ calibration option for this ECU & not perform a pre-clear.
Indicates that a reflash of the firmware will reset the calibration to default values. May simplify the user-interface flow when reflashing + reprogramming ECUs.
A2L: Populates Version field of MOD_PAR section in A2L file.
A2L: Populates name of MODULE in A2L file. If not specified the ECU name is used (i.e. REV_NAME).
A2L: Populates long identifier field of MODULE in A2L file. If not specified, the generated ECU Identity display name / version (REV_VERSION or Virtual Version) is used.
Supported by Ginmake 1.41 and later, GIN file version 3.23.
Adds meta data from a file. This is generally used for output pin configuration files:
[METAFILE,pin_config,aem25_pin_config.xml]
See the X25 source code for an example XML file. This enables ‘Configure Outputs’ on GWv4.
Endian Directives cause the next item to have the given endian mode applied.
[MSB_FIRST] (big endian)
[LSB_FIRST] (little endian)
e.g.
1uint16_t value; // [MSB_FIRST][Value,,,,,,,,,]
[MIN_VERSION,<version>]
Specify a minimum ginmake version to interpret this file, e.g. [MIN_VERSION, 2.22.0.0]. If minor revisions are not specified, they will be assumed to be 0, e.g. 2.22 = 2.22.0.0. An error will be issued if the current ginmake version is lower than the minimum.
Note: This feature was only added in version 2.22 so the directive will not be recognised for earlier versions of Ginmake. Instead, you can use the pre-processor code below to enforce a minimum Ginmake version.
Added in version 2.24
[PACK_PUSH,align]
...
[PACK_POP]
Pushes the current alignment (default is 4) onto a stack and sets ‘align’ as the current packing / alignment value.
Pushes the prior alignment value from the stack and sets it as the current packing / alignment value.
Note: in ginmake 2.19+. page tables can be avoided through using a combination of SEGMENT and SEGMENT_ADDRESS definitions.
A file containing a page table may be referenced in a header file using either PAGETBL or PAGETBLV2:
[PAGETBL=COMS.ASM]
[PAGETBLV2=COMS.ASM]
PAGETBL indicates an old-style page table and is present in most existing code. This is now restricted to 32 entries (to catch errors when upgrading to the extended comms protocol) and should have contiguous a EEROM segment. This version of page table allows ROMBS to be used as EEROM in ASM code if it directly follows the EEROM data.
PAGETBLV2 indicates that the page table should be handled differently by Ginmake and is intended for use with the extended comms protocol. PAGETBLV2 does NOT allow ROMBS to be used for calibration data. With PAGETBLV2 it is possible to have breaks in the EEROM data so that parameters and/or ROMBS may be inserted in the middle of the EEROM data without being a part of the calibration. This is generally required when using the extended protocol because the header information must still reside in page 0x1F (i.e. a read of 0xDF 00 using the 13 bit protocol). If splits exist in EEROM, multiple regions will be added to the calibration data with a single checksum added at the location of CHKLOC or CRCLOC. All regions are summed up to the location of the checksum.
Objects such as maps and tables are not allowed to span region boundaries. Ginmake will emit errors in such situations and suggest padding values.
Also see section on SEGMENT definitions for multi-region calibrations / parameter spaces.
Parameter tables are similar to tables but use live parameter data to fill the table.
A parameter table is defined with a name, axis start and offset labels, an optional axis parameter to determine the current site and a list of parameters defining the value at each site.
A parameter table is defined as follows:
| Field Name | Definition |
|---|---|
| PARAMTBL | This is entered as is and defines the values as a parameter table. |
| Name | Defines the name of the parameter table. This is displayed in selection menus and at the top of the table when displayed. |
| Axis Parameter | This is the name of the parameter used for the axis of a table (or x axis of a map). In some tables (e.g. battery compensation table) the parameter is used to determine the current position in the table. In others (e.g. speed table) the parameter is used by the maps that use the table as their axis. This name may also be the name of a table used for the axis of a table or map (as referred to in the speed table example). Note tables take precedence over parameters. You should avoid duplicating names of parameters, options and tables for values that are referenced by this field. If such a conflict exists, Ginmake will warn you. |
| Axis Units | The units for the axis (or x axis of the map). (May also be user scalar units as per field 2.). Defaults to an empty string. |
| Start | The axis value of the first step. This is an integer value. If preceded by a ‘*’ the subsequent real value is the first step value. Defaults to 0. Alternatively, this may be the name of an option if a table has not been used for the axis parameter. The name may optionally be placed in brackets. |
| Offset | The offset of each subsequent axis site from the start axis value. This is an integer value. If preceded by a ‘*’ the subsequent real value is the offset. Defaults to 1. Alternatively, this may be the name of an option if a table has not been used for the axis parameter. The name may optionally be placed in brackets. |
| Parameter[1] | Defines the parameter used to determine the value of the first site. This is followed by the names of the parameters defining the subsequent site values. Ginmake 1.78+ May also use a range expression here. There are 2 possible formats 1) A range of parameters separated by an ellipsis, which will include all parameters in declaration order between (and including) the start and end values given. <param[1]>…<param[N]> e.g. TPER00…TPER31 2) A printf style format expression, preceeded by an ellipsis, the bounds for the expanded range are placed in the next two fields following this field. e.g. [PARAMTBL, |
| Parameter[2] | [Optional] Second parameter in the table. |
| Parameter[n] | [Optional] Nth parameter in the table. |
Profiles are supported in version 3.17 Gin files.
Syntax:
1[PROFILE,<profile name>]A profile generates a tag that is referenced by other objects in the GIN file. The profile can be used to hide various objects from the user.
The objects may be shown to the user by toggling an option in GW. The option will be labelled with the name provided in the PROFILE definition.
Profiles can be applied to options, tables, parameters and maps in the read/write field.
See also: Option, Parameter, Table and Map definitions, Read/Write field
Supported by Ginmake 1.44 and later, GIN file version 3.24 or later.
[PROTOCOL, <type> {,<MAX_READ> {,<MAX_WRITE>}} ][PROTOCOL:<conn>, <type> {,<MAX_READ> {,<MAX_WRITE>}} ]
1#define MAX_READ_USB 256
2#define MAX_WRITE_USB 4
3
4// [PROTOCOL GemsExtended, 2, 2]
5// [PROTOCOL:LIBUSB, GemsExtended, MAX_READ_USB, MAX_WRITE_USB]
‘conn’ refers to the connection type to which to associate the protocol. If this field is not supplied, then the default protocol is defined. See [CONNECTION].
’type’ may be one of: Gems13bit [Existing protocol] GemsExtended [Extended address/size protocol]
‘MAX_READ’[optional]: Maximum number of data bytes that can be requested from the ECU in a single read command. Default is 2.
‘MAX_WRITE’[optional]: Maximum number of data bytes that can be written to the ECU in a single write command. Default is 2 for connection specific protocols and 1 for the default protocol (can be set directly or overridden with [WORDWRITES] which sets this to ‘2’).
See the Gemscom Protocol Specification for more details on the protocol implementations.
It is perfectly legal to specify different protocol types for different connections which aids the development process - the code in the ECU can be more gradually converted over to use newer protocols. Additionally, there may be different hardware buffering constraints for different connection types.
Supported by Ginmake 2.37 and later.
[RENAME,new_name]
Renames the prior definition. If appropriate, the existing name will be added to the front of the old names list.
Supported by Ginmake 1.61
[SEGMENT,<mem_type>,<name>,<symbol_name>{,<checksum_name>,<checksum_type>}]
Defines segments that should be used by the page table and address assignment.
Segment definitions must precede the page table (PAGTBL or PAGETBLv2). Additionally, the definitions must precede the checksum locations.
Parameter Description
| <mem_type> | Describes the type of memory. One of: nvm: Non volatile memory (i.e. Calibration memory – options/maps). ram: Parameter memory (e.g. parameters, parameter tables). rom: Readonly memory (e.g. ECU header at DF00). |
| Name of the segment. There should be a #define that equates to its address that is used during page table processing. e.g. EEROM, RAMBS etc. | |
| <symbol_name> | Name of the symbol used for the storage attribute to in the C source code. For ASM compilations, this field is for segment lookups e.g. EEROM. The symbol name is case insensitive for historical reasons. e.g. idata, near (legacy names from X25 code). uint16_t near option_variable; // [Option X, …] This may use a #define that is not visible to ginmake code: e.g. #ifndef GINMAKE #define GXGRAM #endif uint16_t GXGRAM option_variable; // [Option X, …] |
| <checksum_name> | Name of region checksum variable. Optional. |
| <checksum_type> | Type of region checksum. Possible values: additive crc16 next_region [default] none |
Defaults
Unless specified, segments are defined by default that are equivalent to the following:
Tip
For unused pages in the page table, you can create an unused area:
// [SEGMENT,rom,NOT_USED,__not_used]
The page table file should define the physical addresses of the various segments using #define statements.
e.g.
1const uint16_t near wpagetbl[32] = {
2RAMBS, // $00 Parameters start here (0x2000)
3RAMBS + 0x100, // $01
4RAMBS + 0x200, // $02
5RAMBS + 0x300, // $03
6RAMBS + 0x400, // $04
7RAMBS + 0x500, // $05
8RAMBS + 0x600, // $06
9RAMBS + 0x700, // $07 Parameters end here (0x27FF)
10RAMBS + 0x800, // $08
11RAMBS + 0x900, // $09
12RAMBS + 0xA00, // $0A
13RAMBS + 0xB00, // $0B
14RAMBS + 0xC00, // $0C
15RAMBS + 0xD00, // $0D
16EEROM, // $0E Options start here (0x3000)
17EEROM + 0x100, // $0F
18EEROM + 0x200, // $10
19EEROM + 0x300, // $11
20EEROM + 0x400, // $12
21// etc..
In ASM code, the page table is similar to that in C compilation. In ginmake versions prior to 2.07.00, it was not possible to define custom segments that were larger than a single page and additionally all EEROM based sections would be merged into a single Region in the GIN file.
The situation has now changed in 2.07.00 and [SEGMENT] definitions are handled.
There are defaults applied in the absence of any SEGMENT definitions:
If the EQU name starts with EEROM then interpreted as NVM. Checksums will be set to ‘InNextRegion’ until chkloc or crcloc is seen.
ROMBS will be a ROM section and must start at page 0x1F.
Anything else will be RAM by default unless a SEGMENT definition overrides that.
e.g.
1;[LSB_FIRST][SEGMENT,nvm,COPROPT2,COPROPT2,,none]
2COPROPT2 EQU $7800
3ifdef __GINMAKE__
4segment 'COPROPT2'
5endif
6// data in segment 'COPROPT2'pagetbl.asm entries parse the labels and discard the value after the ‘+’. It is expected that entries are contiguous for a given segment name.
Ginmake 2.39+
Since version 2.39, segments may have ATTRIBUTES specified. These attributes allow fine-tuning of the output when generating A2L files.
| Attribute | Meaning |
| NO_A2L | Do not export the segment in the A2L file |
| PrgType | Set the PrgType field of A2L MEMORY_SEGMENT. Possible values: CALIBRATION_VARIABLES, CODE, DATA, EXCLUDE_FROM_FLASH, OFFLINE_DATA, RESERVED, SERAM, VARIABLES, |
| MemoryType | Set the MemoryType field of the A2L MEMORY_SEGMENT. Possible values: EEPROM, EPROM, FLASH, RAM, ROM, REGISTER, NOT_IN_ECU, |
| Attribute | Set the Attribute field for the A2L MEMORY_SEGMENT. Possible values: INTERN, EXTERN, |
| XCP_CHECKSUM | Set the CHECKSUM field of the XCP IF_DATA on the MEMORY_SEGMENT. |
| ADDRESS_MAPPING | Set the ADDRESS_MAPPING block of the XCP IF_DATA on the MEMORY_SEGMENT. This attribute is a semicolon separated list of integer values source, dest, size for the address re-mapping values. |
| SECTOR | Sector number (XCP IF_DATA of MEMORY_SEGMENT) |
| NUM_PAGES | Number of Pages (XCP IF_DATA of MEMORY_SEGMENT) |
| ADDRESS_EXTENSION | Memory address extension value (XCP IF_DATA of MEMORY_SEGMENT) |
| COMPRESSION_METHOD | Compression Method, relates to PGM commands (XCP IF_DATA of MEMORY_SEGMENT). This is an 8 bit unsigned integer, the host does not do anything with this value. |
| ENCRYPTION_METHOD | Encryption Method, relates to PGM commands (XCP IF_DATA of MEMORY_SEGMENT). This is an 8 bit unsigned integer, the host does not do anything with this value. |
Supported by Ginmake 2.19+
[SEGMENT_ADDRESS,<segment_name>,<gemscom_address>,<size>[,<physical_address>[,gcc_section]]]
Defines address / size of a segment previously defined by a SEGMENT definition. This removes the need for PAGETBL / PAGETBLv2 – memory segments can be defined purely with SEGMENT and SEGMENT_ADDRESS since ginmake 2.19. This is preferable for code that does not use a page table for gemscom address translation.
Parameter Description
| <segment_name> | Name of the segment to match that in its SEGMENT definition |
| <gemscom_address> | Address of the segment used over the gemscom protocol. This is a virtual address and is remapped by the ECU to a physical address. |
| Size of the segment, in bytes. At time of writing, GWv4 will read/write entire calibration (NVM) segments. | |
| <physical_address> | Optional physical address of the segment from the perspective of the target computer (the ECU). This may be useful for diagnostic purposes in future. |
| <gcc_section> | Section name used by linker for this segment that will appear in the GNU linker map file. |
Example
An example of using SEGMENT and SEGMENT_ADDRESS to define memory segments without needing a page table (PAGETBL / PAGETBLv2).
1// [LSB_FIRST][SEGMENT,ram,Measurements,SEG_RAM,,none]
2// [LSB_FIRST][SEGMENT,nvm,Calibration,SEG_NVM,,none]
3// [LSB_FIRST][SEGMENT,rom,Identity,SEG_ROM,,none]
4// [SEGMENT_ADDRESS,Measurements,0x0000,0x0100,.modelData]
5// [SEGMENT_ADDRESS,Calibration,0x0100,0x1E00,0x20009000,.modelDataNVM]
6// [SEGMENT_ADDRESS,Identity,0x1F00,0x0100,0x2000F000]
Supported by Ginmake 2.19+
[SEGMENT_BEGIN,<segment_name>]
Start a segment section. This allows C code to avoid placing a segment location on variables defined between SEGMENT_BEGIN and SEGMENT_END. Or particular use if C style structs are used to define the memory of a region.
Segments may not be nested.
Parameter Description
| <segment_name> | Name / symbol of the segment to match that in its SEGMENT definition |
Example
Supported by Ginmake 2.19+
[SEGMENT_END,<segment_name>]
Closes segment opened with SEGMENT_BEGIN.
Parameter Description
| <segment_name> | Name / symbol of the segment to match that in its SEGMENT definition |
Example
[SIZEOF,n]
Causes the base size of the next defined object to be reinterpreted.
For example, if there is a byte value defined:
1USERMSG1 DS.B 1 ;[User Message1,,,,r,,,,H,]A 16bit alias may be added that also spans the next byte:
Following use of the sizeof override to create an object, the override is reset. The override also does not survive until the next source code definition (e.g. the next DS.B).
Added in version 2.65.
Add / change the prefix used for generated Simulink signal name. For builds using XCU API, signals are prefixed with XCU_ by default. Specifying [SL_PREFIX,] overrides the default, removing the prefix, which can be useful for legacy name mappings (e.g. EM80M compatibility layer).
This is a post-fix directive and may be used on any object that may be used to generate a signal.
Additionally, the directive may be used as a post-fix on [SEGMENT] to apply the prefix to an entire memory segment.
Added in version 2.24
Instantiate a struct. The struct being instantiated must currently be included within a STRUCT_BEGIN / STRUCT_END block.
[STRUCT,name]
As of ginmake 2.24, simple struct typedefs are parsed.
As of ginmake 2.41, if the name ends with a ‘#’ character, it shall synthesize names in the format ’name #NNn member’, instead of using array syntax ’name[N].member’. If the name ends with ‘#.’, then the format will be dotted, e.g. ’name_#NNn.member’.
As of ginmake 2.45, struct identifier numbering syntax was extended to allow starting at indices other than 0 by specifying a number before the #.
e.g.
[STRUCT,MyStruct1#] will start numbering at 1
[STRUCT,MyStruct2#] will start numbering at 2.
Currently, it is necessary to use the typedef name of the struct as the data type in other structures – the ginmake C parser is currently quite limited.
Structs that you intend to instantiate through the STRUCT directive should not have their definition within a SEGMENT_BEGIN / SEGMENT_END section.
Structs can contain members that do not have ginmake comments. These are not accessible via the GIN file but their size and alignment will be taken into account when computing the structure size and alignment. Alignment can be controlled with PACK_PUSH / PACK_POP.
The ’name’ field is used as a prefix for the names within the struct. The struct member names are appended to the prefix and separated by a dot character.
Arrays are also supported. The array will be un-rolled and the names will include the array index, starting at zero.
typedef struct CAL_track_struct
{
1int32_t lon; // [Longitude,(GPS Coord Units),,,o,-,f,,]
2int32_t lat; // [Latitude,(GPS Coord Units),,,o,-,f,,]
3uint16_t course; // [Course,(GPS Course Units),,,o,,f,,]
4uint16_t width; // [Width,(Track Width Units),,,o,,f,,][DESCRIPTION,If this value is zero then the track entry is disabled.]
5} CAL_track;
6typedef struct CAL_data_nvm_struct{
1// [SEGMENT_BEGIN,CAL_SEG_NVM]
2CAL_track tracks[CAL_TRACK_COUNT]; // [STRUCT,Track][ATTRIBUTES,gps_start_line]
3// crcloc must be at the end!
4uint16_t crcloc; // specially handled by ginmake - region checksum
5// [SEGMENT_END,CAL_SEG_NVM]
6} CAL_data_nvm;This would produce items in the calibration along the following lines:
Track[0].Longitude Track[0].Latitude Track[0].Course Track[0].Width
Track[1].Longitude Track[1].Latitude Track[1].Course Track[1].Width
Track[2].Longitude Track[2].Latitude Track[2].Course Track[2].Width …
[TYPEDEF_SIZE,name,size,[align]]
Introduces a type name to the C parser. Used for e.g. structs to declare their size for ginmake.
‘align’ is optional as of Ginmake 2.24.0 and is the alignment value of the structure. If elided then the default alignment value is used (see PACK_PUSH / PACK_POP).
Unit definitions allow additional units to be specified by this ECU definition file that are not in the list of predefined units (See Units and Quantities).
| Field Name | Definition |
|---|---|
| UNIT | This is entered as is and defines the values as a unit definition. |
| Name | Defines the name of the unit. If blank, this is the same as the unit ID’s unit name. |
| Unit ID | Defines the unit ID of this unit. e.g. afr:AFR Ammonia for Air Fuel Ratio This MUST include the quantity ID of the unit and the unit identifier. |
| Display Unit | The display unit. If blank, this is the same as the unit IDs unit name |
| Aliases | Semicolon separated list of aliases used for lookups. E.g. km/h might have an alias ‘kph’. |
| M | Defines the default scalar. Defaults to 1. This value indicates the linear conversion from the relative unit to convert from a value in the relative unit to this one. For example, if defining kilograms relative to grams, then the scaling factor would be 0.001. |
| C | Defines the default offset. Defaults to 0. As with ‘M’ this is the offset from the relative unit being derived from. |
| Relative To | Unit ID of the unit that this unit is derived from. If not given, the scaling is relative to the reference ‘unity scaled’ (root) unit for the given quantity. A quantity must always have a ‘root’ unit. The quantity does not need to be provided here – derived units may only belong to the same quantity as the unit they are relative to. If the quantity is given it will be checked. |
Example:
1// [UNITQUANTITY,CPU Power,cpu_power][DESCRIPTION,CPU Processing Power]
2// [UNIT,FLOPS,cpu_power:flops,FLOPS,,,,][DESCRIPTION,Floating Point Ops / Second]
3// [UNIT,Kilo FLOPS,cpu_power:kflops,KFLOPS,kiloflops,0.001,0,cpu_power:flops]
4// [UNIT,Mega FLOPS,cpu_power:mflops,MFLOPS,megaflops,0.001,0,cpu_power:kflops]
5// [UNIT,Giga FLOPS,cpu_power:gflops,GFLOPS,gigaflops,0.001,0,cpu_power:mflops]
6// [UNIT,Tera FLOPS,cpu_power:tflops,TFLOPS,teraflops,0.001,0,cpu_power:gflops]
7// [UNIT,Peta FLOPS,cpu_power:pflops,PFLOPS,petaflops,0.001,0,cpu_power:tflops]
8// [UNIT,Exa FLOPS,cpu_power:eflops,EFLOPS,exaflops,0.001,0,cpu_power:pflops]
Defines a custom unit quantity to be added to the set of predefined units for this GIN file (See Units and Quantities). If a unit quantity is defined and there is a predefined quantity of the same ID then the defined quantity will replace the predefined one.
Unit quantities must always include a ‘root’ unit; root units are those that have unity (‘identity’) scaling where m = 1 and c = 0 in the linear scaling function f(x) = m.x + c.
| Field Name | Definition |
|---|---|
| UNITQUANTITY | This is entered as is and defines the values as a unit quantity definition. |
| Name | Defines the name of the unit. |
| Identifier | Defines the ID of this quantity as used in unit IDs. |
User scalars allow the units, scalar and offset to be defined by the user within GW. By specifying the units (including table axis units and map x and y axis units) as a name in brackets (e.g. ‘(load)’) a user scalar is created with the appropriate name (if necessary) and assigned to the type.
Since GIN version 3.33, DELETE
Supported by Ginmake 2.38 and later.
1[DELETE,name[,type]]Extend an existing item of the given name and, optionally, type in case of ambiguity.
e.g.
DESCRIPTION, ALIAS
Ginmake 2.62+
1[ALIAS,name,alias_name[,type]]Clone object named ’name’ of type ’type’ with new name ‘alias_name’. Type field is optional.
Note that for more control, the following is now also possible in ginmake 2.62+, to create a new object at the same location as the EXTEND item:
// [EXTEND,TIC 01 Time][TC1,,,,r,+,i,,,]
ATTRIBUTES are supported on USERSCALAR / OPTUSERSCALAR.
The actual parameters of the user scalar are defined using the following methods for fixed value scalars and offsets and option user scalars:
1;[USERSCALAR,<name>,<units>,<FP?>,<format>,<m>,<c>]
2;[OPTUSERSCALAR,<name>,<units>,<FP?>,<format>,
3; <scalaroptname>,<sm>,<sc>,<s\*or/>, <offsetoptname>,<om>,<oc>,<o\*or/>, <chainoptname>]If a value uses a user scalar, the scaled value is calculated using the function:
scaled = raw value * m + c
Scaled values of option user scalars are detailed below the table.
For the user scalar definition, the fields are defined as follows:
| Field Name | Definition |
|---|---|
| USERSCALAR | This is entered as is and defines the values as a user scalar. |
| Name | Defines the name of the user scalar as seen in the user selectable units in GW and AEMPro. Must be specified and match an existing user scalar. If the name is prefixed with ‘!’ then the user scalar will be hidden from units configuration. Supported in GIN version 3.33, GWv4.03.45. |
| Units | Defines the default units used by values assigned with the user scalar. Defaults to an empty string. A unit quantity may also be specified by using a colon ‘:’ character with the quantity before the colon and unit afterwards. See 9 The quantity should be the ‘script name’ for the quantity. Also, the script name for the unit can be used when a quantity is specified. e.g. afr:LA for Air Fuel Ratio : λ If the unit’s field is encapsulated in O[…], this refers to an option that has an enumeration defining the units. The enumeration must only contain the names of user scalars that will become a dynamic chained user scalar. |
| FP? | Defines whether the default scaled value uses floating-point. A ‘y’ or ‘Y’ indicates floating-point. Defaults to integer. |
| Format | Defines the default format used by the default user scalar. Defaults to an empty string. |
| M | Defines the default scalar. Defaults to 1. |
| C | Defines the default offset. Defaults to 0. |
For the option user scalar definition, the fields are defined as follows:
| Field Name | Definition |
|---|---|
| OPTUSERSCALAR | This is entered as is and defines the values as an option user scalar. |
| Name | Defines the name of the option user scalar as seen in the user selectable units in GW and AEMPro. Must be specified and match an existing user scalar. If the name is prefixed with ‘!’ then the user scalar will be hidden from units configuration. Supported in GIN version 3.33, GWv4.03.45. |
| Units | Defines the default units used by values assigned with the user scalar. Defaults to an empty string. A unit quantity may also be specified by using a colon ‘:’ character with the quantity before the colon and unit afterwards. See 9 The quantity should be the ‘script name’ for the quantity. Also, the script name for the unit can be used when a quantity is specified. e.g. afr:LA for Air Fuel Ratio : λ If the unit’s field is encapsulated in O[…], this refers to an option that has an enumeration defining the units. The enumeration must only contain the names of user scalars that will become a dynamic chained user scalar. Dynamic units will override the chained user scalar, if defined. |
| FP? | Defines whether the default scaled value uses floating-point. A ‘y’ or ‘Y’ indicates floating-point. An empty or other value indicates otherwise. Defaults to integer. |
| Format | Defines the default format used by the default user scalar. Defaults to an empty string. |
| Scalaroptname | Defines the name of the option used in the scalar. If the field is blank the scalar is not option scaled. |
| sm | Defines the scalar multiplier. If no scalar option is defined this value is used as the scalar multiplier. Defaults to 1. |
| sc | Defines the scalar offset. If no scalar option is defined this value is unused. Defaults to 0. |
| s*or/ | Defines whether the scalar option is multiplied or dividing into the value of sm. If no scalar option is defined this value is unused. A ‘/’ indicates the scalar option is a divisor. Defaults to multiply. |
| Offsetoptname | Defines the name of the option used in the offset. If the field is blank the offset is not option scaled. |
| om | Defines the offset multiplier. If no offset option is defined this value is used as the offset multiplier. Defaults to 1. |
| oc | Defines the offset. If no offset option is defined this value is unused. Defaults to 0. |
| o*or/ | Defines whether the offset option is multiplied or dividing into the value of sm. If no offset option is defined this value is unused. A ‘/’ indicates the offset option is a divisor. Defaults to multiply. |
| Chainusname | Defines the name of a chained user scalar name. If blank, no user scalar is chained to the option user scalar. If O[…] is used in the unit’s field for dynamic units, it will override the chained user scalar. It can be useful to leave this in if you might need to convert the gin file to an older version. |
If a value uses an option user scalar, the scaled value is calculated using the same function as user scalars, but the values of m and c are calculated using separate functions:
scaled =
If a scalar option is defined the value of m is calculated using one of the functions:
if <s*or/> is set as ‘*’, m =
if <s*or/> is set as ‘/’, m =
else m is set to
The value of c is similarly calculated for its respective fields of
If the offset/scalar option values are zero and division is used, the values are treated as if they were 1.
Some units require calibration through an option user scalar before a meaningful unit can be assigned to it. An example of this is Air Fuel Ratio (AFR).
From GWv4 2.03.45, it is possible to use dynamic chained units in user scalars so that the chosen calibrated units can be stored in the ECU. Prior to this, base unit overrides would need to be stored outside of the ECU, making the calibration less portable.
Multiple interacting elements are required to implement this feature in an ECU definition file:
AFR units that may be selected for this ECU. These user scalars associate a name with a unit ID and are looked up from the AFR_UNIT_LIST enumeration. So that these items do not show up in user unit selection in GW, their names are prefixed ‘!’ to hide them.
1[USERSCALAR,!AFR Not Calibrated,AFR Not Calibrated,y,,,]
2[USERSCALAR,!AFR Lambda,afr:LA,y,,,]
3[USERSCALAR,!AFR Ethanol,afr:AFR Ethanol,y,,,]
4[USERSCALAR,!AFR Methanol,afr:AFR Methanol,y,,,]
5[USERSCALAR,!AFR Gasoline,afr:AFR Gasoline,y,,,]
6[USERSCALAR,!AFR Diesel,afr:AFR Diesel,y,,,]
7[USERSCALAR,!AFR Propane,afr:AFR Propane,y,,,]
8[USERSCALAR,!AFR Hydrogen,afr:AFR H2,y,,,]
9[USERSCALAR,!AFR CNG,afr:AFR CNG,y,,,]Enumeration used for selection of chained user scalar from the AFR Base Units option. This lists the USERSCALAR items that specify the AFR units:
1[ENUM=AFR_UNIT_LIST, 0,AFR Not Calibrated, 1,AFR Lambda, 2,AFR Ethanol, 3,AFR Methanol, 4,AFR Gasoline, 5,AFR Diesel, 6,AFR Propane, 7,AFR Hydrogen, 8,AFR CNG ]Unit scalar, will offer unit conversions if a base unit has been set via AFR Base Units option – the AFR Base Units option is specified here via O[…]:
1[USERSCALAR,AFR Units,O[AFR Base Units],y,,,]Option User Scalar for calibration factors from raw values to an AFR unit. This is chained to the AFR Units user scalar. Option User Scalars do not offer unit overrides in GEMS GW software.
1[OPTUSERSCALAR,AFR,,y,,AFR Scalar,,,,AFR Offset,,,,AFR Units]Calibration Option allowing user to specify the units that AFR is calibrated to:
uint8_t afr_units; // [AFR Base Units,,ol(AFR_UNIT_LIST),,o,,,,]
Calibration Options for the AFR scaling factors:
1int16_t afr_scalar; // [AFR Scalar,,\*0.001,0,o,2,f,,]
2int16_t afr_offset; // [AFR Offset,,\*0.001,0,o,2,f,,]
Example Option using the AFR scaling chain:
Supported by Ginmake 1.25 and later, Gin file version 3.21
Objects may be supplied with default values. For many objects, it is acceptable that they are initialized to zero. For others it is not so good (can result in damaging behaviour from the ECU).
Default values can be specified in one of two ways:
1[VALUES={1, 2, 8, 16, 5}]1[VALUES=10]
2[VALUES=@8u:0xFFFFFFFFFFFFFFFF]
3[VALUES=_x \* _y]
4[VALUES=BILINEAR_INTERP(_x, _y, MAPSSTP, MAPLSTP, 10, 100, 80, 255)]The specified values correspond to the raw values that would be expected in the ECU memory.
The VALUES clause must be placed after the object definition that it should be attached to.
Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.
Initializer lists should have the same number of elements as the underlying object. You may specify a different number, but you will get a compiler warning. You should use column-major ordering:
| 0 | 1 | |
| 1 | 2 | 4 |
| 0 | 1 | 3 |
You would use: [VALUES={1, 2, 3, 4}]
Expressions can contain anything, providing they do not start with a curly brace (otherwise they will be interpreted as an initializer list).
In the above examples, the first and second expressions are simply numbers. This value is copied into all sites of the object.
The third expression uses the special _x and _y symbols. These correspond to the x and y position in the object being filled with data. So in this example, at position (0, 0) you would have a value of (0 * 0) = 0. at position (1, 1) you would have a value of (1 * 1) = 1.
The fourth example uses a function-like macro, which is defined as follows:
1#ifdef __GINMAKE__
2#define LINEAR_INTERP(x, width, x0, x1) (x0 + (x \* (x1 - x0)) / (width – 1))
3#define BILINEAR_INTERP(x, y, width, height, y0x0, y0x1, y1x0, y1x1) \
4 LINEAR_INTERP(y, height, \
5 LINEAR_INTERP(x, width, y0x0, y0x1), \
6 LINEAR_INTERP(x, width, y1x0, y1x1))
7#endifIt uses the _x and _y values to fill a map with the 4 specified corner values 10, 100, 80 and 255. These values are interpolated and is equivalent to the ‘calculate’ function in GW.
Ultimately a binary representation of the object is generated and stored in the Gin file.
Since Ginmake 1.38, it is possible to initialize a value with an address, with optional type discriminator:
Supported by Ginmake 1.24 and later, Gin file version 3.21.
This sets up its preceding object with a range of valid values. This will be used by GW in doing a sanity check on a given calibration and note possible problems.
e.g.
In this example, it suggests that Rad Fan should be in the range 1…255.
The minimum or maximum may be omitted if there’s no limit:
// [VALIDRANGE,1,]
Values are RAW unscaled values.
Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.
To specify VALIDRANGE in physical (scaled) values, use HARDLIMITS.
In GW 4.03.12+ this is more strongly enforced when setting values and is somewhat equivalent to EXTENDED_LIMITS in A2L files, though not a 1:1 mapping.
For A2L output, VALIDRANGE is exported as EXTENDED_LIMITS on calibration objects,
in the same way as HARDLIMITS, but with raw bounds converted
to physical values (except for enumerations). A2L does not support
EXTENDED_LIMITS on MEASUREMENT objects.
Supported by Ginmake 2.41 and later.
This sets a prefix for all following variable names. Can be useful for disambiguating identifers in A2L export when structures are used.
e.g.
Supported by Ginmake 1.24 and later, Gin file version 3.21
This is similar to VALIDRANGE but sets up a default range for views in the user interface. This can be useful if the range normally used is only a small subset of the total possible range. This is a soft limit – the user may specify values outside of this range. For ‘strong’ limits, use VALIDRANGE or HARDLIMITS.
e.g.
1// [Rad Fan 1,,OL3,,o,2,i,,][VIEWRANGE,1,100]
Values are RAW unscaled values.
Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.
To specify VIEWRANGE in physical (scaled) values, use LIMITS.
For A2L output, VIEWRANGE sets the object’s lower and upper limits. Raw values
are converted to physical values, except for enumerations, which use raw values.
For example, [VIEWRANGE,-1000,1000] with a *0.1 scalar exports limits of
-100 and 100.
DEPRECATED – use [PROTOCOL] in new code.
Version 1.07 generates v3.10 GIN files that include a word writes flag. The flag can be set by adding a comment in the source containing:
[WORDWRITES]
This allows data to be written two bytes at a time and increases comms performance. Note that word writes are always aligned to word boundaries.
Supported by Ginmake 1.44 and later, GIN file version 3.24.
Embeds an XML description file into the GIN file. See example_descriptions.xml.
[XMLDESCRIPTIONS,<filename.xml>]
The XML description file allows GWv4 to display descriptions about objects within the GIN file. This format file is extensible so that new features may be added to description files and GWv4 without requiring a new version of GIN file.
Example XML file:
Note some of the features here. This follows standard basic XML formatting – if you are unfamiliar, refer to http://www.w3schools.com/xml/default.asp .
The ‘descriptions’ root tag must always be present. Parameters, options, maps etc are referenced via specific tags and the mane attribute is given to identify the specific object. A short description that may show up as a tooltip in some situations in GWv4 can be defined using the ’tip’ attribute. The longer description is plain text within the tag.
Additional references may be present in the description – for example the parameter ‘Bar’ references the parameter ‘Foo’ from its description. GWv4 may show this as a hyperlink or draggable object.
Reference tags differ from the outer tags. And are prefixed with a ‘g’. This avoids overlap with existing HTML tags (param, option and map):
gparam, goption, gtable, gmap etc.
These references are equivalent to HTML anchors:
Which may also be used instead if the display text should be different to the actual name being referenced or if embedding HTML tags inside the link is required.
GIN file version 3.24+
It is now possible to specify the quantity to which a unit belongs. In some cases, this will avoid ambiguities of what the unit really is (for example a ‘%’ unit would be difficult to interpret and is not obvious that it may mean ‘% load’.
To specify a quantity in a unit field, use a colon character. If just specifying a unit, omit the colon as per the existing behaviour.
These are valid examples: distance:m acceleration:m/s/s volume:m3 volume: m3
If possible, use only quantities and units that are found in the following list. Clearly this is not always possible but do at least try to include a known quantity. Don’t make up quantities if there is not one available – get it added into GWv4 first.
The first quantity name should be used by your code. In some cases, there is a separate display unit from the script unit (e.g. “µG” or “uG”). Use one of these in your units – don’t use the unit name as this will not be recognised.
Quantity: unitless ("-")
Null “”, 1.0
Quantity: acceleration (“Acceleration / Gravity”), “acceleration:”
Metres / Second Squared “m/s²”, “m/s/s”, 1.0
G Force “G”, 0.101971621
Milli G Force “mG”, 101.971621
Micro G Force “µG”, “uG”, 101971.621
Millimetres / Second Squared “mm/s²”, “mm/s/s”, 1000.0
Feet / Second Squared “ft/s²”, “ft/s/s”, 3.2808399
Inches / Second Squared “in/s²”, “in/s/s”, 39.3700787
Quantity: afr (“Air Fuel Ratio”), “afr:”
Lambda “λ”, “LA”, 1.0
AFR Ethanol “AFR Ethanol”, 9.0
AFR Methanol “AFR Methanol”, 6.4
AFR Gasoline “AFR Gasoline”, 14.7
AFR Diesel “AFR Diesel”, 14.5
AFR Propane “AFR Propane”, 15.5
AFR Hydrogen “AFR H2”, 34.0
Quantity: angle (“Angle”), “angle:”
Radian “rad”, 1.0
Degree “°”, “deg”, 57.2957795
Revolution “rev”, 0.159154943
Quantity: angular_accel (“Angular Acceleration”), “angular_accel:”
Radians / Second Squared “rad/s²”, “rad/s/s”, 1.0
Degrees / Second Squared “deg/s²”, “deg/s/s”, 57.2957795
Revolutions / Second Squared “rev/s²”, “rev/s/s”, 0.159154943
Quantity: angular_speed (“Angular Speed”), " angular_speed:"
Radians / Second “ω”, “rad/s”, 1.0
Degrees / Second “°/s”, “deg/s”, 57.2957795
Revolutions / Second “rps”, 0.159154943
Revolutions / Minute “rpm”, 9.54929659
Revolutions / Hour “rph”, 572.957795
Hertz “Hz”, 0.159154943
Quantity: area (“Area”), “area:”
Square Metres “m²”, “m2”, 1.0
Square Kilometres “km²”, “km2”, 1e-6
Square Millimetres “mm²”, “mm2”, 1000000.0
Square Feet “ft²”, “ft2”, 10.7639104
Quantity: current (“Current”), “current:”
Amp “A”, 1.0
Kiloamp “kA”, 0.001
Milliamp “mA”, 1000.0
Microamp “µA”, “uA”, 1000000.0
Quantity: data_size (“Data Size”), “data_size:”
Byte “B”, 1.0
Kilobyte “kB”, 0.001
Megabyte “MB”, 0.000001
Gigabyte “GB”, 0.000000001
Terabyte “TB”, 0.000000000001
Kibibyte “KiB”, 0.0009765625
Mebibyte “MiB”, 0.000000953674316406251
Gibibyte “GiB”, 0.000000000931322574615478515625
Tebibyte “TiB”, 9.094947017729282379150390625e-13
Quantity: distance (“Distance”), “distance:”
Metre “m”, 1.0
Kilometre “km”, 0.001
Centimetre “cm”, 100.0
Millimetre “mm”, 1000.0
Mile “mi”, 0.000621371192
Yard “yd”, 1.0936133
Foot “ft”, 3.2808399
Inch “in”, 39.3700787
Light Year “ly”, 1.05702341e-16
Quantity: energy (“Energy”), “energy:”
Joule “J”, 1.0
Kilojoule “kJ”, 0.001
Megajoule “MJ”, 0.001
Calorie “ca”, 0.239005736
Kilocalorie “kca”, 0.000239005736
Quantity: force (“Force”), “force:”
Newton “N”, 1.0
Quantity: fraction (“Fraction / Percent”), “fraction:”
Fraction “frac”, 1.0
Percent “%”, 100.0
Quantity: fuel_economy (“Fuel Economy”), “fuel_economy:”
Kilometres / litre “km/L”, 1.0
Miles / UK Gallon “mpg UK”, 2.82481053
Miles / US Gallon “mpg US”, 2.35214583
Quantity: fuel_consumption (“Fuel Consumption”), “fuel_consuption:”
Litres / Kilometre “L/km”, 1.0
Litres / 100 Kilometres “L/100km”, 100.0
UK Gallons / Mile “UK g/mile”, 0.354006044
US Gallons / Mile “US g/mile”, 0.425143707
Quantity: heart_rate (“Heart Rate”), “heart_rate:”
Beats / Second “Beats/s”, 1.0
Beats / Minute “bpm”, 60.0
Beats / Hour “Beats/h”, 3600.0
Hertz “Hz”, 1.0
Quantity: mass (“Mass”), “mass:”
Gram “g”, 1.0
Kilogram “kg”, 0.001
Metric Tonne “t”, 1e-6
Milligram “mg”, 1000.0
Microgram “µg”, “ug”, 1000000.0
Ounce “oz”, 0.0352739619
Pound “lb”, 0.00220462262
Quantity: mass_flow (“Mass Flow”), “mass_flow:”
Grams / Second “g/s”, 1.0
Grams / Minute “g/min”, 60.0
Grams / Hour “g/h”, 3600.0
Kilograms / Second “kg/s”, 0.001
Kilograms / Minute “kg/min”, 0.060
Kilograms / Hour “kg/h”, 3.6
Pounds / Second “lb/s”, 0.00220462262
Pounds / Minute “lb/min”, 0.132277357
Pounds / Hour “lb/h”, 7.93664144
Ounce / Second “oz/s”, 0.03527396192
Ounce / Minute “oz/min”, 2.11643772
Ounce / Hour “oz/h”, 126.986263
Quantity: power (“Power”), “power:”
Watt “W”, 1.0
Milliwatt “mW”, 1000.0
Kilowatt “kW”, 0.001
Megawatt “MW”, 0.000001
Horsepower “hp”, 0.00134102209
Calories / Second “cal/s”, 0.239005736
Calories / Minute “cal/min”, 14.340344
Calories / Hour “cal/hour”, 860.42065
Kilocalories / Second “kcal/s”, 0.000239005736
Kilocalories / Minute “kcal/min”, 0.014340344
Kilocalories / Hour “kcal/hour”, 0.86042065
Quantity: pressure (“Pressure”), “pressure:”
Pascal “Pa”, 1.0
Kilopascal “kPa”, 0.001
Megapascal “MPa”, 0.000001
Bar “bar”, 0.00001
Millibar “mbar”, 0.01
Pounds / Square Inch “PSI”, 0.000145037738
Millimetres of Mercury “mmHg”, 0.007500637
Quantity: resistance (“Resistance”), “resistance:”
Ohm “Ω”, “ohm”, 1.0
Kiloohm “kΩ “, “kohm”, 1000.0
Megaohm “MΩ “, “Mohm”, 100000.0
Quantity: respiratory_rate (“Respiratory Rate”), “respiratory_rate:”
Breaths / Second “Breaths/s”, 1.0
Breaths / Minute “Breaths/min”, 60.0
Breaths / Hour “Breaths/h”, 3600.0
Hertz “Hz”, 1.0
Quantity: speed (“Speed”), “speed:”
Metres / Second “m/s”, 1.0
Kilometres / Hour “km/h”, 3.6
Miles / Hour “mph”, 2.23693629
Knots “kt”, 1.94384449
Quantity: temperature (“Temperature”), “temperature:”
Celcius “°C”, “C”, 1.0
Fahrenheit “°F”, “F”, 1.8, 32
Kelvin “K”, 1.0, 273.15
Quantity: throughput (“Throughput”), “throughput:”
Packets / Second “Packets/s”, 1.0
Quantity: time (“Time”), “time:”
Second “s”, 1.0
Millisecond “ms”, 1000.0
Microsecond “µs”, “us”, 1000000.0
Minute “min”, 0.016666666667
Hour “h”, 0.000277777778
Day “day”, 1.15740741e-5
Quantity: torque (“Torque”), “torque:”
Newton Metre “N.m”, 1.0
Newton Centimetre “N.cm”, 100.0
Foot Pound “ft.lb”, 0.7375621
Dyne Centimetre “dyn.cm”, 1e7
Quantity: voltage (“Voltage”), “voltage:”
Volt “V”, 1.0
Millivolt “mV”, 1000.0
Microvolt “µ"“V”, “mV”, 1000000.0
Quantity: volume (“Volume”), “volume:”
Cubic Metre “m³”, “m3”, 1.0
Cubic Centimetre “cc”, 1000000.0
Litre “L”, 1000.0
Millilitre “ml”, 1000000.0
Microlitre “µl”, “ul”, 1000000000.0
Cubic Foot “ft³”, “cft”, 35.31466672
Cubic Inch “in³”, “cin”, 61023.74409
UK Gallon “UKga”, 219.969157
US Gallon “USga”, 264.172052
Quantity: volume_flow (“Volume Flow”), “volume_flow:”
Cubic Metre / Second “m³/s”, “m3/s”, 1.0
Litre / Second “L/s”, 1000.0
Millilitre / Second “ml/s”, 1000000.0
Cubic Metre / Minute “m³/min”, “m3/min”, 60.0
Litre / Minute “L/min”, 60000.0
Millilitre / Minute “ml/min”, 60000000.0
Cubic Metre / Hour “m³/h”, “m3/h”, 3600.0
Litre / Hour “L/h”, 3600000.0
Millilitre / Hour “ml/h”, 3600000000.0
The GIN minification feature is like the ‘Customer GIN’ feature in GWE2 and can be used to:
The sections below define their use and include examples.
The command line option --minify[=source.gin] will create a minified version of the source GIN based on a template (and path) specified by the --minify-template=templatefile option. If no source is supplied, the last built GIN file will be used. If no template is supplied, the minifier will exit. The output path of the minified GIN is specified using the --minify-output=path option. If no output path is supplied, the compiler output file path will be used. The resultant minified GIN will have “.min” appended to the source GIN name.
The minifier will create a copy of the source GIN and keep only the options that are in the template. Templates can be GIN, GWE2 cgt or JSON files. If the template is a JSON file it must have the following format:
A warning will be raised if:
The general format of the JSON template file should look like this:
1{
2 "keep": {
3 "recommended": true,
4 "all_in_category": [
5 "category1",
6 "category2"
7 ],
8 "channels": [
9 "channel1",
10 "channel2"
11 ],
12 "options": [
13 //options to keep
14 ]
15 // other tables/maps/logmaps/strings/channeltables etc. to keep
16 },
17 "remove": {
18 "channels": [
19 "channel3"
20 // other channels to remove
21 ]
22 // other options/tables/maps etc. to remove
23 }
24}An example JSON template file:
1{
2 keep: {
3 channels:[
4 "DEBUG1",
5 "Map_Start"
6 ],
7 options:true,
8 tables:[
9 "TPSPRS",
10 "VCALTBL"
11 ]
12 },
13 remove: {
14 options:[
15 "MaxOnTime"
16 ],
17 channels:[
18 "CNT_DEM"
19 ]
20 }
21}The command line option –minify-list=source.gin will create a minification JSON template from the specified GIN file. If no GIN is supplied, the most recent GIN will be used. The output path for the template can be specified with --minify-list-output=output.json5. If not supplied, the path will be generated from the source GIN name. The resultant JSON template will have “.min” appended to the source GIN file’s name, and will have a similar format to the examples given above.
If there are no suitable templates available, the –minify-list=source.gin feature can be used to create one. This can then be trimmed in a text editor and re-imported to Ginmake via --minify[=source.gin] to create a minified GIN.
At the end of the build process, Ginmake can be used to check addresses between the firmware build and the resultant GIN file or ecudef. The firmware’s linker map is compared to the address map held in the GIN file, and errors will be raised for any address mismatches between ginmake calculated addresses, and linker generated addresses.
Address mismatches can sometimes arise from compiler optimisations. If using optimization, it is recommended to use -fno-toplevel-reorder to avoid re-ordering of global variables. Alternatively it may be possible to use structs instead to ensure ordering.
Address verification can be started using the command line options –verify-mapfile-gin=ginpath and –verify-mapfile=mapfilepath for the specified GIN and linker map. If no GIN is supplied, the most recent GIN will be used. The linker map file is mandatory.
For a full report of the items checked, specify the –verbose command line option.
GCC Section names must be associated with [SEGMENT] definitions (or in Simulink options file). It is possible to specify a fixed physical address of a segment. If not specified then ginmake will attempt to deduce this from the map file.
The following objects are optional – GW can run OK without any of these defined in the GIN, unless the ECU relies on the behaviour manifest by their existence (for example COMOK). For many of these, this is just an indication of what rather than why, since this is getting beyond the scope of this documentation. None of these objects influence the behaviour of Ginmake at all and are described here purely for reference purposes.
There are a number of reserved variable names that define special ECU registers. These definitions do not require structured comments to describe them:
| Variable Name | Definition |
|---|---|
| STAT1 | Status register – typically used to determine if the engine is running. The Engine Running bit is 0x20 |
| PCTL | Program Control (typically used for programming the checksum) |
| PACK | Program ACKnowledge |
| SCMD1 | Special command register 1 (used in the 14bit addressing protocol) |
| SCMD2 | Special command register 2 (used in the 14bit addressing protocol) |
| LOGTBL | Defines the location of the log table. This is used to implement fast parameter updates. Note that the length of the table is defined by using an array initializer. The base size is generally a 16bit. |
| Chkloc | Defines the end of a region and the additive checksum for that region (located in ROM). |
| Crcloc | Defines the end of a region and the CRC checksum for that region (located in ROM). If the size of the base object is 16bit, then it will be CRC16 checksum. |
| Chksm | Runtime checksum (located in RAM). |
| Calname | Identifies a location in the ECU that contains the ‘calibration name’ string. Note that the length of the string is defined by using an array initializer. |
| Author | Identifies a location in the ECU that contains an ‘author’ string. |
| SERIAL | Identifies a location in the ECU that contains a ‘serial’ string. Should be an array of 4 bytes. |
| Gemsec{x} | For security – see Section 6.4.Security |
| PROD_ID | Product ID, should be a word. See GEMS document #102700. |
| FTR_STAT | Feature status. Should be an array of bytes (or 1 byte). See GEMS document #102700. |
| FTR_CTRL | Feature control register. Should be an array of 8 bytes. See GEMS document #102700. |
Defining COMOK as a parameter causes GW to poll this value until it is clear after receiving a write failure from the ECU.
This is also done before critical procedures such as ISP.
The ISPEN (ISP Enable) Option is intended to prevent situations where an invalid character received by the ECU could cause it to enter its ISP loop. If available, GW will typically write this to zero after connecting (GW v3.18r05+), and non-zero when performing an ISP.
Enables automatic E2 checksum updates in the ECU. AutoEE is disabled before performing an upload.
The variables “GEMSEC1” through “GEMSEC6” must be defined if you wish to make the ECU securable.
Each of these security characters is usually defined as a byte (although this is not strictly necessary for use with more recent versions of GW).
In order to unlock security, the password is written into these characters.
To erase the calibration and the password, 0xff characters are written into these locations.
Once unlocked, writing a new password should set the ECU password.
Operations are triggered by writing the last gemsec character (gemsec6).
The Fuel map (named “Fuel”) is bequeathed with extra features in GW.
Chiefly, these are:
View [Raw / Pulse Width / Duty Cycle] display options.
Rescale Fuel Map
Optimize Fuel Map
Change Injectors / Pressure
Note that maps other than “Fuel” can be given the attribute “fuel” so that the tuning software can identify it as such and display appropriate menu options. See the attributes section.
As for Fuel Map, this is typically an alias for the Fuel map (uses the same area of memory in the calibration).
Microseconds per bit – required for Fuel map extensions
Required for Fuel map extensions such as optimizing of the map.
LDOMPC is a scaling factor used on the load axis of the map.
Optimizing the fuel map adjusts MSPB, LD0MPC and the fuel map.
The optimize procedure finds the average slope of the map and removes it by adjusting LD0MPC. This is based on the general trend of fuel maps increasing in value as load increases. The map is also scaled to give maximum fuelling resolution.
Generally, optimize is not necessary on engines tuned for Rally.
For Pulse-width display of fuel map (in milliseconds):
The value is based upon the Microsec/Bit (or MSPB) option and the LD0MPC option. The scaling is as follows:
load_scaling = (load_site / load_site_max) +
1 ((load_site_max - load_site) / load_site_max) \* ld0mpc / 256);
2value = (mspb / 1000) \* load_scaling;Try setting the fuel map to 255 in raw mode and then switching to pulse-width mode and adjusting the LD0MPC option to get an idea of how ld0mpc affects the scaling of the map.
Duty Cycle View displays the map in terms of the duty cycle of the injector pulse train. Duty Cycle is the fraction of time that the injector is active as a percentage, so a duty cycle of 100 or greater indicates that the injector is permanently on.
Like pulse-width, the duty cycle view uses the LD0MPC option to scale the map based upon the load site. However, the scaling also takes into account the speed axis.
Try it out on a map where all the raw values are the same and adjust LD0MPC to see the effect.
When viewing in Duty Cycle, you will be asked what kind of engine you are running in order that duty cycle can be correctly calculated.
Causes the fuel map to be interpreted as a TPS based fuel map as opposed to load based.
(Requires Fuel Map)
Sets the amount of fuel used during Cranking for different Throttle positions.
In GW, “Log Rate” this is typically checked for existence to determine if internal logging is supported.
The tuning software writes this parameter to “ON” in order to reset the ECU’s internal log. The reason it is a writeable parameter is that once it has been written, the ECU resets the value to OFF once the log has been reset. Options are not continually read from the ECU and so you end up with your calibration being out of sync with the ECU.
i.e. Log reset is a volatile value. Options, maps etc should not be volatile.
CAN TX (CTele)
CTele ID option format:
IDs are parsed along the lines of: CTele? ID[m]??([x] [b??-??]) Or, as a posix regular expression: ^ctele[0-9] id(m)?([0-9]{2})(x)?( b([0-9]{1,2})-([0-9]{1,2}))?$
For example:
1CTele1 ID01 b02-00 // channel1, message 01, bits 2 down to 0
2CTele1 ID01 b10-03 // channel1, message 01, bits 10 down to 3
Extended IDs have an ‘x’ after the message number: CTele1 ID01x b15-00 // Extended channel1, message 01, bits 15 down to 0
Mask IDs have an ’m’ after ID:
1CTele1 IDm01 b02-00 // MASK, channel1, message 01, bits 2 down to 0
2CTele1 IDm01x b15-00 // MASK, Extended channel1, message 01, bits 15 down to 0
CTele message option format: ^ctele%1 m([0-9]{2})([wb])([0-9]+)
e.g.
1CTele1 M01W1 // Channel 1, Message 1, byte 1 (word 1)
2CTele1 M01B2 // Channel 1, Message 1, byte 2
3CTele1 M01W2 // Channel 1, Message 1, byte 3 (word 2)
4CTele1 M01B4 // Channel 1, Message 1, byte 4
5CTele1 M01W3 // Channel 1, Message 1, byte 5 (word 3)
6CTele1 M01B6 // Channel 1, Message 1, byte 6
7CTele1 M01W4 // Channel 1, Message 1, byte 7 (word 4)
8CTele1 M01B8 // Channel 1, Message 1, byte 8
Note the padding of the message number.
CTele message specific options format:
1CTele1 rate1 // Channel 1, Message 1 rate (rarely used)
2CTele1 m01 bytes // Number of bytes to transmit for this message.
3CTele1 id1 ext // Channel 1, Message 1 Use extended ID switch.
4CTele1 Extended01 // Channel 1, Message 1 Extended ID switch (not actually parsed).
There appears to be an issue here - some ECUs define CTele1 Extended01. However, the option that is actually used for this is ‘CTele1 id1 ext’ In GWv4 4.01.05 and later, this option will be parsed correctly and is equivalent to ‘CTele1 id1 ext’.
CTele channel specific options format:
1CTele1 speed // Channel 1 bus speed
2CTele1 bit rate // Channel 1 bus speed alias (typically the RAW value).
3CTele1 rate // Message periodic rate.
4CTele1 enable // Turns channel on/off.
CAN RX
There are the options to describe the arbitration ID for reach message and parameters to describe where the received CAN data is placed.
CAN RX parameter format: CAN1 RX1 W1 CAN1 RX1 W2 CAN1 RX1 W3 CAN1 RX1 W4
The first number is the CAN channel, the second is the message number (which message CANID it corresponds to). The W number is the index of the word in the message buffer. Upon reading CAN data it is the ECU’s responsibility to push the data into these parameters as appropriate.
CAN RX ID option format: The IDs are formatted in a similar manner to CAN TX and can be split across multiple options. They can be bytes or words:
1CAN1 RXID01 b02-00 // channel1, message 01, bits 2 down to 0
2CAN1 RXID01 b10-03 // channel1, message 01, bits 10 down to 3
Extended IDs have an ‘x’ after the message number: CAN1 RXID01x b15-00 // Extended channel1, message 01, bits 15 down to 0 .. etc …
CAN RX extended enable option format: You can specify a switch channel that causes the extended CAN ID to be used to receive data into the CAN RX parameters by using single bit ON/OFF options:
CAN1 RXID Extended01 1st number being channel, of course and the second being the message number. For some reason in this case the message number must be left-padded with zero to be two characters long.
Mask may be specified as: CAN1 RXIDM Extended01 Though in reality I’m not even sure it can be made to work as there is no mask ID parsed for CAN RX channels (but it IS for CAN TX).
Ginmake version 1.74+
This section details the use of Ginmake for Simulink® Enabled GEMS electronic controllers. It includes information on the build process, command line options, and how to use the Simulink® related features.
ginmake –simulink-options=options-file –simulink-base-gin=some.gin –simulink-output=dir
The options file can specify both the output directory (dir) and/or the base gin. The command line options will override the options file.
The base GIN file describes the base-level un-extended functionality, protocols etc for the ECU and is strictly required.
The generated model source code and the user workspace file should be provided in the model_sources section of the options file. These are necessary for code/data generation.
Ginmake will generate an externs file in such a way to allow the firmware to convert virtual gemscom addresses to real addresses. The externs file is also processed to add the items to the base gin file and generate a merged gin.
The generated model code is parsed to check which main processor signals are used and generate the
Simulink export will generate a number of files:
The Simulink options file controls what files are input and output.
The file is in a permissive JSON format that supports c-style comments and allows key names to be specified without quotation marks. The entire file must be a JSON object.
Use target: "CDX" to select CDX export. Like target: "XCU8", this defaults to
A2L output, does not require a base GIN, and enables direct calibration access.
Alternatively, set uses_cdx_api: true to select the CDX API independently of the
target’s other defaults. This takes precedence over uses_xcu_api.
CDX uses CDX_ API symbols and cdx_*.h API headers. CAN transmit entry points
take no execution deadline: CDX_STATUS CDX_auto_can_tx(void) and
CDX_STATUS CDX_auto_can_<port>_tx(void).
Periodic scheduling, offsets, and start delays are retained, but transmit frames
have no timeout. Transmit timeout and notification options, including their DBC
attributes, have no effect in CDX mode. No *_can_tx_time.c or *_tx_notify
functions are generated, and notification-dependent transmit timestamps and
error counters are omitted. Receive timeouts are unchanged.
Existing XCU8 and uses_xcu_api configurations are unchanged unless CDX is enabled.
For both CDX and XCU, generated CAN runtime pack/copy calls use internal
start-LSB offsets. Ginmake converts Motorola DBC start-MSB positions during
import, including signals crossing CAN-FD chunk boundaries. This applies to
TX setters, RX/TX start values, multiplexor IDs and common-signal copies.
Keep the original DBC layout; no application offset adapter is required.
Regenerate CAN code with the corrected Ginmake executable to pick up this fix.
Legacy canfuncs code generation retains its own offset convention.
Use urgent_tx inside a can entry to select imported TX frames for urgent
transmission on a physical CAN bus. This option is currently only supported by the CDX API.
Selected frames are excluded from normal transmit rate groups and un-selected frames are processed normally.
For example, add something along the following lines to your Simulink options file, replacing the DBC filename and frame names with those from your application:
{
target: "CDX",
can: [
{
port: "IPC1",
tx: ["physical_can_tx.dbc"],
urgent_tx: [
{frame: "TorqueRequest", port: 0, policy: "step", lifetime_us: 2000},
{frame: "Heartbeat", port: 1, policy: "periodic", period_us: 1000, lifetime_us: 3000},
{frame: "ShiftRequest", port: 0, policy: "triggered", lifetime_us: 2000}
]
}
]
}Each urgent_tx entry accepts these fields:
| Field | Meaning |
|---|---|
frame |
Exact name of a unique TX frame imported into this can entry. Each frame may be selected only once, must be nonmultiplexed, and must have 1..64 payload bytes. |
port |
Physical destination: 0 = CAN1, 1 = CAN2. This is independent of the containing can.port, including named ports such as IPC1. |
policy |
"step", "periodic", or "triggered", as described below. |
lifetime_us |
Urgent enqueue lifetime in microseconds, from 1 to 1000000. |
period_us |
Required for "periodic", from 1 to 1000000 microseconds. For other policies, omit it or set it to zero. |
Use the actual physical-bus DBC IDs and payload layouts, not an IPC-specific representation. The generated enqueue call uses the imported frame’s CAN ID, payload length, and standard/extended, CAN FD and BRS flags.
Sending policies
step: attempts one enqueue on every call to CDX_auto_can_tx_urgent().periodic: attempts an enqueue on the first call, then when at least
period_us has elapsed since the last attempt. Each attempt rearms from the
current time; missed releases are skipped, not sent in a burst. The actual
timing is limited by how often your application calls the function.triggered: attempts one enqueue when the model sets its generated
CDX_<frame-prefix>urgent_request data store to a nonzero value. The request
is cleared before enqueueing, even if the queue rejects the frame. Multiple
writes before the next call represent a single request, not a queue.Application integration
Call CDX_auto_can_tx_init() during initialization. It also initializes urgent
scheduling, clears requests and counters, and sets per-frame status to
CDX_STATUS_NO_DATA. In each foreground model cycle, use this order:
CDX_auto_can_tx_urgent() to enqueue due urgent frames.CDX_auto_can_tx() for ordinary transmission.Urgent calls are foreground-only and nonblocking. Do not call them from an
interrupt handler. To reset only urgent scheduling, requests and diagnostics,
call CDX_auto_can_tx_urgent_init() from the foreground.
For triggered frames, the generated TX MATLAB workspace file supplies the
request signal as ImportedExtern when generate.can_tx_workspace is enabled.
Use that generated signal as the model’s data store; the C request variable is
uint8_t. Refer to the generated CAN TX header for the exact frame-prefixed
symbol names.
Enqueue results
CDX_auto_can_tx_urgent() returns CDX_STATUS_NO_DATA when no frame is due,
CDX_STATUS_OK when all attempted enqueues are accepted, or the first enqueue
error. Each selected frame also exposes:
| Generated symbol | Meaning |
|---|---|
CDX_<frame-prefix>urgent_status |
Result of the most recent enqueue attempt; unchanged when the frame is not due. |
CDX_<frame-prefix>urgent_accepted |
Number of accepted enqueues (uint32_t). |
CDX_<frame-prefix>urgent_rejected |
Number of rejected enqueues (uint32_t). |
Message delivery is not guaranteed - the accepted count only counts messages that have been successfully enqueued. The counters wrap on overflow.
The cdx-runtime provides cdx_fast_io.h and CDX_can_tx_urgent_enqueue.
Each can entry accepts either a numeric port from 1 to 64 or a port name.
For XCU and CDX, port: "IPC1" and port: "ipc1" both generate
XCU_CAN_BUS_ID_IPC1 or CDX_CAN_BUS_ID_IPC1. Names are converted to uppercase
and must start with a letter or underscore, followed by letters, digits or
underscores. Numeric ports retain their existing behavior: port: 2 generates
XCU_CAN_BUS_ID_CAN2 or CDX_CAN_BUS_ID_CAN2.
Entries with the same normalized name share a bus. Named ports also use their
uppercase name in generated per-port identifiers and segment semantics, for
example canrxIPC1 and cantxIPC1. The usual canrx, cantx, can and model
RAM segment fallbacks still apply.
A2L Simulink builds generate CDX_IPC_INTERFACE_HASH for the CDX API (including
CD6 builds), or XCU_IPC_INTERFACE_HASH for the XCU API, alongside EPK_VALUE
in <file_prefix>epk.h. These are string macros that may be overridden with an
existing definition.
EPK_VALUE remains the build identity. The IPC interface hash is a 40-character
SHA-1 hex string depending only on the contents of the DBC files imported through
can.rx and can.tx. File paths, import order, repeated identical files, CAN
ports, model versions and other build inputs do not affect it. Any DBC content
change, including comments, affects the hash.
The hash is SHA-1 of the concatenated, lexicographically sorted, unique SHA-1 hex
digests of the DBC files. With no DBC files, it is the SHA-1 of an empty input:
da39a3ee5e6b4b0d3255bfef95601890afd80709.
Example:
1// Options for ginmake simulink code generation / build steps
2// All paths/filenames are relative to this file unless specified as absolute paths
3{
4 include:["common.opt"], // Optional list of options files to process before this one.
5 target:"EM80-M", // May be blank for legacy behaviour. Use "XCU8" for the XCU8 ECU. V2.51+
6 base_gin:"EM80_M-00x06.gin", // Not required for XCU8 target – do not specify.
7 // a2l: true/false – generate A2L instead of GIN, implicitly defined by target option. V2.51+
8 file_prefix:"auto_EM80_M-", // "" == generate from ECU name loaded from base_gin (i.e. not on XCU8).
9 out_dir:"./BuildEnv/src/Simulink",
10 out_dir_can:"./BuildEnv/src/Simulink/can",
11 out_dir_gin:".",
12 out_dir_workspace:".",
13 temp_dir:"",
14 direct_cal_access: true, // On XCU8, use fast direct calibration variable access for get/set functions.
15 use_temp_files: true, // Write code to temporary files and only overwrite if contents changed.
16 compiler_packing: 4, // Packing affects addressing of externs that would be aligned by compiler.
17 compiler_array_alignment: 1, // Minimum alignment for arrays of values.
18 categories:[], // list of category names if filtering required.
19 // Terse options for placement. Using regions is more flexible.
20 // ram_address: 0xE000, // virtual 'gemscom' address of volatile items (gems parameters)
21 // nvm_address: 0xF000, // virtual 'gemscom' address of non-volatile items (gems options/tables/maps)
22 // ram_size: 0x1000, // max size (bytes) reserved for RAM segment
23 // nvm_size: 0x1000, // max size (bytes) reserved for NVM (non volatile memory) segment
24 asm_gcc_prefix_underscore: false, // GCC: set this if underscore is added to function names by compiler
25 asm_iar_prefix_underscore: false, // IAR: set this if underscore is added to function names by compiler
26 canrx_data_size: 16, // Usually best not to specify these
27 cantx_data_size: 12,
28 canrx_frame_timeout_multiplier: 10, // defaults for these
29 canrx_frame_timeout_default: 10000,
30 cantx_frame_timeout_multiplier: 0, // TX: multiplied by GenMsgCycleTime, added to fixed value (XCU). v2.75+
31 cantx_frame_timeout: 1000, // TX fixed timeout value (XCU). v2.75+
32 cantx_frame_timeout_enable: true, // Enable CAN Tx timeouts (XCU) v2.75+
33 virtual_version: "$(BaseVersion)-XYZ-$(ModelVersion)", // Generate virtual version to disambiguate ECU names. Currently, Name, BaseVersion and ModelVersion are recognised. As are environment variables.
34 output_filename: "$(FilePrefix)$(Name)-$(BaseVersion)-XYZ-$(ModelVersion)",
35 model_sources:[
36 "em80m_generation.c",
37 "em80m_generation.h",
38 "user_workspace.m",
39 "model_sources.grh" // includes multiple files recursively, with C preprocessor support (ginmake 2.51+)
40 ],
41 // Files to use in ginmake 2.51+ build
42 // (in addition to generated externs.h)
43 // Not typically used for EM80-M target.
44 inputs:[
45 "app_version.h",
46 "xcu_cal.h",
47 "multiple_headers.grh" // includes multiple files recursively, with C preprocessor support.
48 ],
49 can: [
50 {
51 port:2,
52 speed:1000000,
53 rx_prefix: "CRX_",
54 tx_prefix: "CTX_",
55 rx_name_prefix, "CAN2 RX ",
56 tx_name_prefix, "CAN2 TX ",
57 rx_gin_category, "CAN2.Signals", // Semicolon separated list Category names to add RX signals to.
58 rx_raw_gin_category, " CAN2.Raw",// Semicolon separated list Category names to add raw RX signals to (e.g. frame data & bytes).
59 rx_time_gin_category, " CAN2.Time",// Semicolon separated list Category names to add time RX signals to (time / delta time).
60 rx_frame_time_prefix: "CRX_Time_",
61 rx_frame_elapsed_prefix: "CRX_Elapsed_",
62 rx_real_only: false, // If true, export all rx signals from can as real32_T
63 rx_use_start_values: true, // CDX/XCU: initialize RX signals from DBC GenSigStartValue. Set false for zero-filled RX buffers.
64 tx_use_start_values: true, // CDX/XCU: initialize TX signals from DBC GenSigStartValue. Multiplexor group IDs are always initialized.
65 keep_duplicates: true,
66 warn_duplicates: true,
67 prefix_frame_name: false,
68 default_tx_rate: 10,
69 disable_demultiplex: false,
70 disable_tx_multiplex: false,
71 disable_tx_notify: false, // XCU: flag tx frames as not requiring completion notification. Overridden by DBC attribute GemsEnableNotify. v2.75+
72 tx_timeout: 0, // If nonzero, overrides global cantx_frame_timeout (XCU). Overridden **by DBC attribute GemsMsgTimeoutOffset. OR: GemsMsgTimeout - which is an absolute value that also overrides timeout multiplier.** v2.75+
73 tx_timeout_multiplier: 0, // If nonzero, overrides global cantx_frame_timeout_multiplier (XCU). Overridden by DBC attribute GemsMsgTimeoutMultiplier. v2.75+
74 // tx_timeout_enable: true, // Overrides global cantx_frame_timeout_enable. Overidden by DBC attribute GemsMsgTimeoutEnable v2.75+
75 disable_demultiplex: false, // Disable de-multiplex of CAN frames.
76 disable_tx_multiplex: false,
77 rx: ["can_rx.dbc"],
78 tx: ["can_tx.dbc"],
79 rx_nodes: "VDM", // optional: Only import VDM frames for RX. Do not specify to import all
80 tx_nodes: ["LCM1","BCS"], // optional: Only import LCM or BCS frames for RX.
81 filter_rx_nodes_on_signals: true // set to false to filter based upon frame TX node.
82 }
83 ],
84 segments: [
85 {
86 name: "MODEL_NVM",
87 address: 0xF000,
88 size: 0x1000,
89 physical_address: 0x0800F000, // Optional physical address (if known).
90 semantic: "model_nvm",
91 identifier: "seg_nvm",
92 gcc_section: ".modelDataNVM",
93 memory_type: "nvm",
94 address_define: "GEMS_SECTION_ADDRESS_NVM",
95 endian: "MSB_FIRST",
96 attributes:{ // [ATTRIBUTES] to add to segment
97 // ADDRESS_MAPPING:"{APP_SEG_NVM_DEFAULT_ADDR};{APP_SEG_NVM_ADDR};{APP_SEG_NVM_SIZE}",
98 PrgType:"DATA",
99 MemoryType:"FLASH",
100 Attribute:"INTERN",
101 SECTOR:0,
102 NUM_PAGES:1,
103 ADDRESS_EXTENSION:0x00,
104 COMPRESSION_METHOD:0x00,
105 ENCRYPTION_METHOD:0x00,
106 }
107 },
108 {
109 name: "MODEL_RAM",
110 address: 0xE000,
111 size: 0x1000,
112 semantic: "model_ram",
113 identifier: "seg_ram",
114 gcc_section: ".modelData",
115 memory_type: "ram",
116 address_define: "GEMS_SECTION_ADDRESS_RAM"
117 },
118 {
119 name: "CANRX2",
120 address: 0xB800,
121 size: 0x800,
122 semantic: "canrx2", // can use can, canrx, canrxN, cantx, cantxN
123 identifier: "seg_crx2",
124 gcc_section: ".modelDataCRx2",
125 memory_type: "ram",
126 address_define: "GEMS_SECTION_ADDRESS_CANRX2",
127 endian: "LSB_FIRST"
128 },
129 ],
130 generate: {
131 date_comment:false, // Include date/time in source file comment.
132 // Turn off to prevent otherwise identical files from being touched.
133 get_set:true,
134 get_set_real_only:false, // Make all get/set values real32_T as per old behaviour.
135 utility_functions:true,
136 workspace:true,
137 workspace_descriptions:true,
138 workspace_optimize:true, // use signal factory functions to reduce workspace file size
139 in_signals:true,
140 externs:true,
141 externs_addresses:true, // generate #defines for the virtual address of each variable, for on-target testing purposes.
142 externs_segment_size:true, // generate #defines for segment used sizes / first identifier.
143 externs_asm_placement:true, // Generate ASM files to place extern variables (avoids compiler re-ordering). Also generates a .c file.
144 asm_gcc_comment_start: "@", // GCC Assembler uses different comment char depending upon target!
145 unused_externs:false, // generate externs for simulink objects even if not used by model
146 gin:true,
147 gin_code:true,
148 ecudef_code:true,
149 gin_append_model_version:true,
150 units:false,
151 identity:true, // Generate identity.c
152 can_rx_h: true,
153 can_rx_c: true,
154 can_rx_workspace: true,
155 can_rx_frame_time: true,
156 can_rx_frame_elapsed: true,
157 can_rx_frame_timeout: true,
158 can_tx_h: true,
159 can_tx_c: true,
160 can_tx_workspace: true,
161 can_tx_frame_time: true,
162 can_tx_frame_error_counters: true,
163 can_frame_bytes: true,
164 can_signal_size_optimization: true, // 2.20.0: RX avoid raw value using all bytes in the CAN frame.
165 can_integer_frame_times: true, // 2.34.0: Use uint32_T for frame times instead of real32_T.
166 simulink_categories: true, // Link objects to categories based upon Simulink.Type. Default true.
167 m_file_per_function: true // Use separate .m file for workspace optimization functions.
168 }
169}If not provided, the model_nvm and model_ram segments will be automatically generated based upon nvm_address/size and ram_address/size respectively. Ginmake uses the ‘semantic’ field to look up sections so these must match correctly.
With workspace_optimize enabled, each enabled workspace script uses its own signal factory:
GemsSignal for workspace, GemsGetSetCanRx for can_rx_workspace, and
GemsGetSetCanTx for can_tx_workspace. With m_file_per_function: true, these
functions are written once per export to separate .m files alongside their workspace
scripts in out_dir_workspace (or out_dir if not specified). Otherwise, each function
is included in its workspace script. Disabling workspace also disables GemsSignal
generation; CAN workspace generation is controlled independently.
The identifier field is used to define a symbol for section placement of global variables and will also be used by ginmake to locate items into calibration regions. Items are expected to be packed according to the compiler_packing value.
Warning: the segment identifier will be converted to lower case internally due to the way segment lookups are performed by ginmake (for legacy reasons), so segment lookups will effectively be case insensitive and name collisions with alternatively cased identifiers should be avoided.
The Simulink code generation can be supplied with a user workspace file that identifies objects used by the Simulink model and should be available to the calibration software.
Enumerations and other ginmake directives can appear in this file. These should be specified in comments that begin with %+.
e.g.
Items may have ginmake style comments preceding them. These will be added to the generated externs file (possibly with some translations).
Such comments must begin with %$.
Empty fields in such ginmake comments (e.g. the item name) may be filled in by ginmake using the details in the MATLAB object definition before writing to the externs file.
Items in the user workspace should use the ImportedExtern CoderInfo.StorageClass.
e.g.
1%$ [,speed:rpm,,,r,,,,#.##,]
2MySignal = Simulink.Signal;
3MySignal.CoderInfo.StorageClass = 'ImportedExtern';
4MySignal.DataType = 'single';
5MySignal.Complexity = 'real';
6MySignal.InitialValue = '0.0';It is also possible to specify the fields of an object definition in a more readable way. For example:
1%$ units: speed:rpm
2%$ readonly: true
3%$ axis_param: Flyspd
4%$ scalar: 1
5%$ offset: 0
6%$ reciprocal: false
7%$ category: breakpoints
8%$ format: #.##
9Bpx = Simulink.Breakpoint;
10Bpx.SupportTunableSize = false;
11Bpx.Breakpoints.DataType = 'single';
12Bpx.Breakpoints.Min = [];
13Bpx.Breakpoints.Max = [];
14Bpx.Breakpoints.Unit = '';
15Bpx.Breakpoints.FieldName = 'Bpx';
16Bpx.Breakpoints.Description = '';
17Bpx.Breakpoints.Value = [1 2 3 4 5];
18Bpx.Breakpoints.TunableSizeName = 'N';
19Bpx.CoderInfo.StorageClass = 'ImportedExtern';
20Bpx.CoderInfo.Alias = '';
21Bpx.CoderInfo.Alignment = -1;
22Bpx.StructTypeInfo.Name = '';
23Bpx.StructTypeInfo.DataScope = 'Auto';
24Bpx.StructTypeInfo.HeaderFileName = '';The full list of available fields is as follows:
Unless stated otherwise, these fields follow those in the parameter/option/table/map definitions. Remember that to create the desired object, you must use the correct number of fields required for that object (unused fields can be left blank).
Examples of how to use limits on raw and real values can be found in VIEWRANGE, LIMITS and HARDLIMITS sections. Note: In Ginmake 2.21+, floating-point objects without limits set will generate a warning. To remove this warning, one of the following needs to be set for the object: Valid range, View range, Limits, Hard Limits.
By Default, Simulink.Signal objects will be placed in RAM (the segment with semantic:“model_ram”).
All other objects will go into NVM (model_nvm).
It is possible in ginmake 1.91+ to specify the segment NAME in the preceding comment to override this behaviour.
e.g.
Items in functions whose names end with _GEMS_Initialize will be added to initialization lists in generated firmware code.
Fixed CDX/XCU runtime CAN pack/copy calls to use internal start-LSB offsets for Motorola signals in TX setters, RX/TX start-value initialization, multiplexor initialization and common-signal copies.
Added ‘Urgent TX’ feature for CDX Runtime integration. See manual for details on how to configure this feature in the options file. Updated manual styling. Use MS Edge / Chrome for PDF generation of manual.
Added representative A2L project regression test (compare full output to reference A2L). Added –timestamps and –no-timestamps commandline options to avoid putting date/time into output file notes. Useful if the output must be 100% repeatable.
T#6747: Update to Visual Studio 2026 Moved manual upload to new server. a2l/1.71.1: Write shortest round-trip floating-point coefficients without reducing numeric precision. B#7083: A2L export: retain option scalar and offset in COMPU_METHOD coefficients, preserving bit-mask scaling adjustments.
B#7054: ginmake simulink: CAN signal packing optimizer can result in overwriting of other signals in some cases: Fixed Simulink DBC CAN Tx setters overwriting neighboring signals when mask and shift are required. Retained aligned stores and added inline masked updates for simple packed fields. Fixed Motorola CAN-FD cross-boundary packing using invalid adjusted bit offsets.
B#6949: A2L export: honour VIEWRANGE/LIMITS and export VALIDRANGE/HARDLIMITS as EXTENDED_LIMITS for calibration objects. Fixed HARDLIMITS upper bounds being ignored unless LIMITS was also specified. Added W4038 for HARDLIMITS/VALIDRANGE on A2L measurements (suppress with -u4038). T#7038: Added –version to display only the ginmake version and build number without requiring a license. B#7037: Simulink export: Do not generate GemsSignal.m when workspace generation is disabled. Signal factory files are generated alongside their enabled workspace scripts. Generate CAN get_set.h header to fix insufficient include files issue with embedded coder generated code. Gin file support 3.35. The default output version remains at 3.34. Added round-trip export coverage for explicit GIN 3.35 output; rebuild gemscom after updating its headers to avoid linking stale version support. Fixed non-wx builds of gems by guarding the wx-only theme settings implementation with GEMS_WX. Fixed Release build version mismatches by generating version.h only in libginmake, before the executable and tests are built.
Fixed invalid integer suffix ‘uu’ being generated in some cases. CDX API include cdx_can.h as appropriate.
Fix divide by zero crash if alignment requirement is set to 0.
Added mechanism for generating IPC ‘ABI’ hash for checking IPC signal compatibility.
Fixed unescaped pipe chars in common-definitions manual topic from omitting BIT(…) documentation for Bitmask field. Simulink export: For CDX model integration, CAN Ports may be named instead of numeric (e.g. “IPC1”).
T#6966: Added GenSigStartValue initializers for CAN Rx + Tx frames via options tx_use_start_values and rx_use_start_values. T#6965: Added CDX Simulink API mode (target: “CDX” or uses_cdx_api: true), with CDX_ API prefixes and CAN Tx without frame timeouts, execution deadlines, or notification handlers. Migrated project to git SCM. Update for refactored gems/gemscom libs. Emerald 5.5.15.
Fix PC-Lint Plus warning in generated code for XCU8 CAN Tx: tx_data could be pointer to const. Fix PC-Lint Plus warning: Repeated include file “xcu_time.h” - now using external include guard.
Fixed duplication of Simulink section in manual & broken image. Fixed generated code for XCU8 CAN Tx notification handling for multiplexed messages.
B#6707: A2L export: set BYTE_ORDER on CHARACTERISTIC or MEASUREMENT if their derived endian mode differs from the global MODULE setting. T#6708: Switched to HTML help system. A PDF version of the manual is now generated from the HTML and is now called GinmakeManual.pdf. Online version of the help is available at https://gems.co.uk/manuals/ginmake
B#6619: Set floating point raw type for floating point signals aliased on XCU8 CAN frames (e.g. CAN Tx / CAN Rx). T#6618: Set valid deadlines for CAN Tx messages. Added simulink options: cantx_frame_timeout_enable cantx_frame_timeout cantx_frame_timeout_multiplier can.disable_tx_notify can.tx_timeout_enable can.tx_timeout can.tx_timeout_multiplier Added support for the following DBC attributes for CAN Tx messages: GenMsgCycleTime - now also used with timeout multiplier to set deadline for CAN Tx message. GenMsgDelayTime - Offset to stagger messages with same cycle time. GenMsgStartDelayTime - Initial delay before first transmission of message.
GEMS custom DBC attributes:
GemsMsgTimeout - Absolute timeout for message, used if GenMsgCycleTime is not specified or if can.tx_timeout_enable is set.
GemsMsgTimeoutEnable - Disable/enable use of timeout for message.
GemsMsgTimeoutOffset - Added to message deadline calculated using multiplier on GenMsgCycleTime value.
GemsMsgTimeoutMultiplier - Multiplier on GenMsgCycleTime to calculate message deadline.
The message deadline is used to prune stale CAN messages from the Tx queue.
XCU8 code generation: do not add ‘u’ suffix to CAN Bus ID symbols. Include xcu_can_bus_id.h for XCU_CAN_BUS_ID type & related defines in ginmake_can_tx.h.
Modified output for XCU CAN API changes.
A2L Export: Use MSB_FIRST instead of BIG_ENDIAN and LSB_FIRST instead of LITTLE_ENDIAN to specify BYTE_ORDER in A2L file, since the BIG_ENDIAN / LITTLE_ENDIAN keywords are deprecated and may not be interpreted as expected by all tools (e.g. CANAPE).
B#6070: Fixed “Duplicate symbol GINMAKE_A2L” error for A2L Simulink builds where –a2l command-line option is also specified. B#6075: Improved error message if e.g. –verify-mapfile is specified along with an accidental compilation target, without a full gimake license. Updated package sdb/3.5.0, fixes issue with misinterpretation of VFrameFormat in DBC files (was always interpreting frames as FD if VFrameFormat was used).
B#6390: Fixed Simulink code generation error: removed subscript from CAN data u64 scalar field accessors.
Fixed a couple of issues in generated C code for Simulink get/set functions relating to integer literal suffixes on bitmask values and correct matching of parentheses in expressions in some cases.
Release now includes 64bit version, which is faster to execute on x64 systems. Removed unused namesdb support / mysql dependency, makes x64 build possible.
Updated compiler to msvc 17.14.19. Updated package manager to conan v2. Updated packages: boost/1.89.0 cryptopp/8.9.0 emerald_id/1.2.66 emerald/5.5.10 gtest/1.17.0 sdb/3.4.0 xz_utils/5.4.5 zlib/1.3.1 zlib-minizip/1.3.1
Simulink: Improved escaping of ‘description’ property. descriptions may use prefix to allow HTML content. Simulink: DBC comment used as description field is now escapoed to avoid ginmake syntax errors.
Fixed A2L export issue where min/max values that have exact integer representations were being exported as floating point values, for example full-scale uint32 would end up with a loss of precision in the A2L file. Now min/max values are exported using integer representation where possible. Numeric precision was also increased for floating point values to avoid precision loss.
Fixed A2L BIT_MASK and BIT_OPERATION handling - A2L BIT_MASK is now shifted and where necessary BIT_OPERATION is included. For cases where a multiplier would be required to convert between raw and physical values, an error is raised so that the transfomation can be applied at source. Note that ASAM specifies MEASUREMENT and CHARACTERISTIC differently - it is not standardised to allow BIT_OPERATION on CHARACTERISTIC items. Fixed issue resolving relative paths when including a grh file within a grh file.
Simulink options: added asm_gcc_ext, asm_iar_ext and asm_msvc_ext options to specify the file extension to use for generated assembly files for different toolchains. Defaults changed to “s”, “s” and “asm” respectively.
Added per-object and per-region attribute “sl_prefix” to control the automatic prefixing of Simulink.Signal names. Added SL_PREFIX directive for shorthand setting of sl_prefix attribute.
B#6197: ALIAS directive now resets [IDENTIFIER],[LONG_IDENTIFIER] and [DISPLAY_IDENTIFIER] to avoid ambiguity with the original object.
B#6180: Fixed bug in expression evaluator that could result in an infinite loop when evaulating cast expressions.
B#6175: get_set.h generation now includes objects derived from STRUCT definition members. B#6176: Simulink get_set: Fixed signed/unsigned literal suffix for ternary expressions passed to XCU_memory_write_u{NN}_masked. B#6177: Simulink get_set: Fixed handling of items that use BIT(offset[|length]) syntax for bitfields.
T#6168: Added new ALIAS directive: Create an alias for an existing object.
T#6178: Support any separator char following # when expanding STRUCT members e.g. “AN_1##” would give AN_01{member}, AN_01_{member} etc.
T#6174: Simulink: use IDENTIFIER in preference to object name for exported Simulink.Signal / Simulink.Parameter objects if it is defined.
T#6179: XCU8 Simulink: Added ‘direct_cal_access’ option, which defaults ON for XCU8 targets.
This allows direct access to calibration variables without going through the XCU_memory read/write API functions.
Individual objects may opt out of this by specifying post-fix [DIRECT_CAL_DISABLE] or [ATTRIBUTE,direct_cal_disable=1] per-object or per-memory segment.
Do not use SC_ prefix for XCU8 API functions. XCU8 API includes utility functions already, so generate.utility_functions no longer has any effect for XCU8 targets. Corrected naming of XCU8 masked write functions in output (postfix with “_masked” instead of “Masked”). Generated get_set.h file for XCU8 targets now includes xcu_utils.h and xcu_memory.h instead of xcu_types.h to ensure that the required XCU8 API function prototypes are available.
Generate base workspace / get/set functions for Simulink models that do not have a base GIN file. Create temp path specified in simulink options file if it does not exist. If using XCU8 API, prefix matlab paramters and signals generated from base platform with “XCU_”.
Added asm_gcc_comment_start to ‘generate’ section as comment start character can vary depending upon target. Defaults to ‘@’. Fixed GCC ASM section syntax for S32K build. Added optional ‘include’ array to simulink options file to allow inclusion of common options files. CAN DBC files are now interpreted in Latin1 encoding rather than UTF-8. For example, fixes display of exported degrees symbol in other applications.
Do not issue error “VirtualMachine::execute: Program has no instructions” for .m files that do not contain any code.
Fixed regression: Use boolean_T instead of bool8_t EM80_M simulink builds.
Fixed regression in expression evaluator whereby integers being divided were no longer giving a floating point result (e.g. 100/65535 would give 0.00152588).
B#6040: New expression evaluator - fixed parsing of negative numbers with typespec prefixes. e.g. [VALUES,{@4f:-10}].
Write defines for segment start pointer / size to separate header file externs_segments.h, instead of inline in externs.h. This file can then be included in places that do not need to see the rest of externs.h. Avoids [MISRA 8.5], in some cases. Write variable address #defines into separate header file {prefix}_externs_addr.h, instead of inline in externs.h, to reduce cost of compilation when this information is not needed within a translation unit. Added GINMAKE_DISABLE_EXTERN_DECLARATIONS preprocessor exclusion to externs.h file to allow translation units to avoid including duplicate extern definitions [MISRA 8.5].
XCU: breaking changes to generated code vs ginmake 2.52.
Simulink: Improved PC-Lint Plus / MISRA compliance for XCU8 generated code. XCU split CAN Rx header into 2 files: xcu8_can_rx.h and xcu8_can_rx_get.h. xcu8_can_rx_get.h now depends on the generated externs.h file to avoid multiple declarations [MISRA 2012 Rule 8.5, required]. CAN RX init routine now in separate file xcu8_can_rx_init.c. CAN TX split header into 3 files: xcu8_can_tx.h, xcu8_can_tx_get.h, xcu8_can_tx_set.h. xcu8_can_tx_get.h now depends on the generated externs.h file to avoid multiple declarations [MISRA 2012 Rule 8.5, required]. General tidying of XCU8 CAN RX code formatting. CAN Tx signal setters: precalculate integer value for boolean signals (avoids MISRA warnings). Generate macro [SEGMENT]FIRST_EXTERN_PTR in externs.h, so that if the first item is an array, a pointer to the first element is given. XCU_generated prefix => XCU_auto_ prefix to reduce identifier length (MISRA). XCU: tx_completion => tx_notify.
B#6013: Simulink: Handle scalar types in addition to char arrays for Min / Max members on e.g. Parameter objects.
T#6030: Generate defaults aspect file + embed in ecudef file (if A2L).
Simulink: Generate integration code for XCU API for XCU8 targets.
Fixed use of grh file in model_sources not adding the referenced paths.
Fixed typo in error message (‘sematic’ => ‘semantic’).
Simulink object attributes: parse quoted strings as C-style strings and remove
the quotation marks. e.g.
%$ format: “#.##” ==> #.##
%$ description: “This is\na description” ==> \n is interpreted as a newline character.
A2L: do not export IF_DATA GEMS FORMAT if the gems format string can be exactly represented by the A2L compu_method.
Reworked compilation so that base sources can be compiled before generated externs.h, with other simulink related operations in-between.
Simulink: remove .tmp file if it was not copied over existing generated file.
Simulink: Include array size in type mismatch error messages for array types.
Simulink: new option generate.externs_addresses. Generates #defines with the expected address of each variable.
Simulink: new option generate.externs_segment_size: Generates #define with the used size of each segment in the externs.h file.
Simulink: new option generate.externs_asm_placement: Generates asm files for various assemblers to place variables in specific order within data segments.
Variables in externs.h then become externs themselves file.
Also generates a .c file with the externs as may be required for e.g. testing purposes.
Simulink rework how padding vars are inserted.
Added ‘attributes’ property to Simulink segment definitions in the options file.
This allows [ATTRIBUTES,…] to be added to segments so that the PrgType can be set for XCP access.
XCU8 CAN RX: Implemented more optimal CAN signal accessor functions vs EM80-M for aligned signals.
XCU8 CAN RX: frame time / period / data are split into separate variables & work with ASM placement feature.
XCU8 CAN RX: CAN-FD support.
Simulink: Support basic function definitions & calls in .m files; VM can now execute the GemsSignal function.
Simulink: case of ‘U’ integer suffix changed to ‘u’ for readability.
Rename legacy GEMS Parameter => Channel in some ginmake output messages.
Note: this is an interim release and does not have full xcu8 target support implemented yet. specifically, the CAN tx/rx API is different to the xcu8 target to EM80-M.
A2L: ecudef archive no longer includes .a2l in the file extension. Added ‘xcu8’ target option to Simulink options file. Added MODULE_NAME, MODULE_VERSION and MODULE_LONG_IDENTIFIER meta strings to override these values in A2L export. A2L: Avoid inserting EPK_ADDR twice in the A2L file. Include EPK in simulink generated A2L file. Output A2L file for XCU8 target without requiring a base GIN file. B#5708: Fixed handling of #elif in preprocessor directives. New evaluator for constant expressions with more C language features including type casts to typedef’d types and numeric literal suffixes. Enumeration strings can now be specified in [VALUES…] directives. [ENUM…] now allows a trailing comma after the last value. Fixed issue with automatic alignment being computed against object size instead of alignment requirement. Fixed: OPTUSERSCALAR units were not being included in ECU definition file. T#1428: Document META strings NO_CLEAR_BEFORE_REFLASH and REFLASH_RESETS_CAL. Simulink: Add VirtualVersion to identity even when not generating GIN file. T#1439: Added support for GRH files in model_sources section of simulink options file. B#5714: Raise an error if defined memory segments [SEGMENT] overlap.
A2L: Support export of ASCII CHARACTERISTIC items for ECU_STRING objects.
Support ATTRIBUTES on LOGMAP objects. B#5408: Fixed Simulink: If base ECU definition already contained an “address_map” meta string then Simulink extended ECU definition file could not be verified against linker map file. Added axis_channel and xaxis_channel aliases for axis_param simulink object attribute. Added yaxis_channel alias for yaxis_param simulink object attribute.
T#5156: Moved SDB (DBC signal database) library to package manager. Updated to C++20.
Support ! and ~ name prefix for ECU_STRING objects for hidden / conversion ignore flags.
T#5042: Changed the way that ginmake checks for duplicate names so that if items within un-instantiated structs may have the same name as items in other structs; duplicate checking now occurs as objects are instantiated. Duplicate name errors now also include an instantiation backtrace.
T#5041: Added options for aligning arrays in the generated C code, even if their base type would not require that alignment level.
Added –array-alignment commandline option. Added compiler_array_alignment option to the Simulink options file. This operates differently to the –array-alignment commandline option in that it will insert padding into the generated C code (externs.h) to ensure that arrays are aligned to the specified level. This is safer in case there are situations where e.g. short arrays do not get aligned in the same way.
Changed error “Segment "%0" ignored when creating regions due to being empty.” to use its own unique error code so that it can be suppressed independently of other ‘possible segmentation error’ warnings.
Modified A2L export of items that are a single bit so that they don’t specify a string format. This will result in GWv4 displaying the values as ON/OFF rather than as a number. A2L: For ‘identity’ (default) COMPU_METHODs, items will now use NO_COMPU_METHOD rather than a shared COMPU_METHOD.
Extended struct identifier syntax to allow starting at indices other than 0 by specifying a number before the #. e.g. [STRUCT,MyStruct1#] will start numbering at 1 and [STRUCT,MyStruct2#] will start numbering at 2. Added IF_DATA GEMS extension to support displaying values in hexadecimal format in GW from A2L files, since this feature appears to be lacking in A2L.
Updated to emerald 5.5.7. A2L Export: Now exporting error/default value/string from FunctionTable and Enumerations.
Writable channels now include READ_WRITE in exported A2L file.
Fixed: If format strings were specified, they would not make it through to A2L exports.
Added VAR_PREFIX directive to allow a prefix to be added to all following variable names, can be useful to disambiguate variables scoped within different structures. Modified the way that identity information is included in PROJECT and MODULE A2L nodes. When concatenating strings from preprocessor symbols, whitespace between the strings is now removed. Fixed units making it through to COMPU_METHOD in A2L when User scalars are used. A2L Export: Combine COMPU_METHODs with the same parameters to reduce the size of the A2L file. A2L Export: Write UTF-8 BOM to A2L file so that unicode characters are interpreted correctly. A2L Export: Export units using REF_UNIT on COMPU_METHODs where appropriate so that GEMS unit IDs can be included as LongIdentifier of UNIT definition in the A2L file. Also unit conversions are identified in the A2L. A2L Export: Only export DISPLAY_IDENTIFIER if DISPLAY_IDENTIFIER is explicitly defined in source code. A2L Export: Change the way that object Name field is generated so that it is based upon the ginmake item name rather than the variable name, unless an IDENTIFIER ATTRIBUTE is explicitly defined. STRUCT instantiation: if the struct name ends with ‘#’ then a numeric suffix is added to the name instead of the default array syntax.
Added XCP PROTOCOL type. When generating A2L, set the GIN protocol to avoid address space exceeded errors. Do not warn about PCTL / PACK / STAT1 for XCP based ECUs.
T4686: Command-line option to generate A2L instead of GIN.
T4697: A2L: File comment to include GIN notes.
T4695: A2L: Generate MOD_COMMON.
T4687/T4690: A2L: Generate Segment information.
Fixed handling of definitions over multiple single-line C++ comment lines, where the comment characters could get included in object definitions.
T4694: Generate MOD_PAR section: EPK, ADDR_EPK and ECU_CALIBRATION_OFFSET.
[META] directives may now contain braced sections which are subject to symbol substitution.
Symbol substitution in braced sections will now remove double quotes from the substituted value.
T4696: Generate FUNCTION definitions in A2L to mirror GEMS GIN Category definitions.
Generate DISPLAY_IDENTIFIER in A2L.
Define GINMAKE_A2L preprocessor symbol when generating A2L.
T4693: Added [INCLUDE_A2L,
Added DELETE directive. Fixed missing conversion from directive IDs to string for newly added directives in 2.37.0. Redefining VALUES on an object is now a warning rather than an error, since this could be wanted behaviour when using EXTEND. Added option for VALUES expressions for defining address: [VALUES=#Analog 00] [VALUES=#Analog 00:channel]
Added new directives: EXTEND, RENAME, IDENTIFIER, LONG_IDENTIFIER, DISPLAY_IDENTIFIER. New GIN file version 3.34, supports serialization of IDENTIFIER, LONG_IDENTIFIER, and DISPLAY_IDENTIFIER.
EXTEND directive allows updating of existing GIN items (e.g. rename, adding default values / descriptions etc). These extensions could be provided in a separate file from the original definition for easier customization of build variants using common source code. Additionally can avoid having verbose metadata in the main source code header files used by assemblers / compilers.
Upgrade to VS2022. Updated dependencies. GIN: fixed loading of identity when scanning file for name/version only and the GIN file uses a virtual version. Added –asm-to-c command-line option to convert assembly header files to C headers. T4417: Produce gin_path.txt for non-simulink builds.
T1438: Support basic typedefs of built-in types in C code. e.g. typedef uint8_t ChargeState; Changed Simulink export to use typedefs for enums rather than #defines in externs.h. Scalar/Offset/RW/Bitmask/Format fields: IFF the whole field is a preprocessor symbol then it will be substituted. Fixed bug in deserialization of values that use type specifiers. Added unit test for testing methods of achieving 100% scaling. Updated to emerald_id 1.2.26. Updated to emerald 5.5.2.
B2897: Improved error messaging for Simulink models. Made CAN frame elapsed / time signals ‘uint32’ rather than ‘single’ by default. To go back to the old behaviour, in simulink options file, set generate: can_integer_frame_times: false
Updated to emerald 5.5.1. Updated to emerald_id 1.2.17.
B1996: boolean_T simulink type will now generate values of type bool in the GIN file.
UT: JSON configuration files can now use more permissive JSONX format: (see https://rubydoc.info/gems/json-next) quotes for strings are optional if they follow JavaScript identifier rules. backtick quoted strings, (like ES6’s template string literal). A backtick-quoted string may span several lines and you are not required to escape regular quote characters, only backticks. Backslashes still need to be escaped, and all other backslash-escape sequences work like in regular JSON. For single-line strings, single quotes (’’) are supported in addition to double quotes ("") # can be used to begin comments (in addition to // and /…/). Commas are optional and trailing commas are supported too. Quotes for string values OR keys are optional if they follow JavaScript identifier rules. Such string may also contain ‘-’ characters. Additional extension: dotted strings (e.g. one.two) are supported.
UT : Fixed linker section address parse for sections whose address appears on the next line in the file.
UT : Added an error if GIN file contains an empty address map when performing map file verification. UT : Perform address verification in linker address order for easier manual analysis. UT : Do not strictly require physical_address to be specified in simulink segment options in order to verify against map file - the section address is now parsed from the linker map file. Resolves issues where physical section placement can change. UT : Fixed insertion of object address offsets into ECU definition file for address verification purposes (fixes address verification of e.g. Simulink CAN RX) - this got missed from merge.
Merge map file verification code into main build - verification was otherwise succeeding without actually checking anything. UT : Added –verbose command line option. Gives more verbose linker map verification output.
UT : Additional change to IDENTITY handling for backwards compatibility issue.
UT : Fixed update of name/version in ECU Identity if IDENTITY directives are used. UT : Updated to Emerald 5.4.4 and emerald_id 1.2.2.
T2876: Added IDENTITY directive for adding fields to generated ECU Identity (to support GLS/GLD loggers use [IDENTITY,GlsVersion,“01V00”]). Output generated identity JSON to file.
B2854: Do not define near/idata/bdata segments if named segments have been manually defined - fixes use of manually names segments with page tables for C builds. B2853: Exclude multi-line comments that are within preprocessor excluded sections. T2787: Added feature matrix to manual.
UT : GIN file version 3.33. Supports attributes + hidden flag on User Scalars + additional GinItem fields (identifier, long identifier, description etc). Enumeration types now also support additional GinItem fields (attributes, identifier, long identifer, description). T2704: Add ability to define units in GIN file (requires GIN version 3.33). Added UNIT and UNITQUANTITY directives for defining user units. T2697: System in place that will allow an option to be used to record the units that AFR are calibrated to & added description of this to the manual. Added unit test for userscalar/optionuserscalar / dynamic base units. UT : Reordered manual topics & made definitions section titles more consistent & alphabetical. UT : Fixed: User scalar units were not being added to the ECU definition file. UT : Fixed issue with default values for empty fields (e.g. scalar multiplier on UserScalar objects). UT : Added features to UserScalar: enable setting display units / base unit overrides. handle unit conversions within gemscom library. gin object now has a UnitSystem object. UT : User Scalars can be hidden from units configuration by prefixing name with ‘!’. GIN file version 3.33 only. UT : Unit tests - store build results in test_vectors/out for convenience. UT : Added GIN/Ginmake/GWv4 compatibility matrix. UT : Updated styling of manual document. UT : Adjusted Simulink multiplexor output to fix up offset of big endian multiplexor signals and include top bit of length to indicate endian.
T2256: Support for structs and arrays of structs. Added STRUCT directive. Added PACK_PUSH / PACK_POP for controlling alignment packing from within code.
UT : Reworked some string processing to use string views. Slight speed increase. UT : Fixed regression dealing with parenthesized references (e.g. user scalar references in units field).
B0158: EM80-M/ginmake multiplex CAN. UT : Fixed build of GIN files from source code that no longer uses page tables.
B0205: Fixed support for Option Steps on table / map axes. UT : Improve error message if failed to open a file (includes the filename). UT : Added gcc_section option to SEGMENT_ADDRESS definitions for storage in the GIN file for address verification purposes. UT : Added physical_address option for segments in simulink options (optional) - if this is specified then it can aid address verification. UT : Issue fatal error if required license is not installed.
T2244-7: KH: Added a MIN_VERSION directive to enforce a minimum Version ersion.
UT : Added [PARSEMODE,ASM|C|C11] directive, which must appear within the first
few lines of a source file.
This allows individual files to define how they should be parsed by ginmake,
making it possible to combine ASM + C in the same ginmake build.
The C11 parse mode is not ready for real-world use - it enables a new
expermental parsing mode that may allow typedefs and struct definitions to be
handled in future. This mode will not handle existing ginmake builds at
present.
Updated to boost 1.77.0.
Simulink: Matlab .m files are now processed before other source inputs and the state between files is preserved to allow enum classdefs to be accessible in multiple files. Fixed an issue where processing the simulink representation of an object before the C extern for it would result in ‘duplicate symbol’ errors.
PB: Fixed some usages of Virtual Version. When running simulink build on a GIN file that already has a virtual version, the base version should be used. #3669: KH: Treat duplicate object names as errors if the object type is the same. Can be suppressed with command line option –treat-duplicates-as-warnings. #3669: PB: Reworked duplicates checking method. Added new error and warning codes for duplicates / old name duplicates. #4721: KH: Simulink CANRX definitions - added additional comments to aid readability. PB: If available, use the original source file/line for errors in the base GIN file when building simulink GIN. Previously there would be no file/line information. #4878: KH & PB: Added error on duplicate entries in simulink options file. Previously, the application would exit in some cases due to bug in JSON parser. PB: JSON parser: Fixed bug in JSON parser that would fail to parse objects with duplicate keys that are arrays. PB: Removed addition of ‘old names’ for CAN RX Time / Delta time etc signals as they could lead to compilation warnings and are no longer needed. PB: Optimized a number of execution time hotspots in order to speed up build times. #3481: KH: Simulink dbc import - Added error and test for duplicate CAN IDs per port. PB: Matrix signals now get generated as tables / maps. #4263: KH: Warning added for when floating point quantities are used without limits defined. Added a test for it. #4929: KH: general tidying. PB: Fixed writing of some older format GIN files, discovered through setting up wider regression test catchment. PB: Optimized GIN ‘find’ routines using hash table. PB: If simulink options file does not exist, raise ‘cannot open file’ error instead of a syntax error in the non-existent file. PB: Generate uniformly named ‘gin_path.txt’ file that contains output GIN file name. Useful for testing & scripting. #4549: PB: T1252: Support Simulink enumerated types. PB: Major rework of Matlab VM for parsing Simulink workspaces. PB: Command line options ‘-c’ and ‘-C’ removed and replaced with opt-in –namecheck & –namecheck-shell options. T#1979 PB: Generate GIN Minifier template from GIN file for template authoring purposes.
Breaking changes: #3829: CAN RX import: added new option to optimize CAN signal base size so that reading values from the ECU in GWv4 and additionally selecting them for ECU internal logging will not waste bytes in many cases.
This new behaviour is enabled by default and will affect reproducible
builds.
In case of problems, the old behavior can be retained in simulink options
files by specifying:
can_signal_size_optimization: false
in the 'generate' section.
Other changes: Modified identifier legalization to deal with items with a numeric prefix. #4755: Added $(FilePrefix) macro for simulink options.
Added rx_gin_category, rx_raw_gin_category, rx_time_gin_category options for Simulink CAN import sections. Allows CAN channels to be added to GIN categories. Catgories need to be defined in e,g, an M file: %+ [CATEGORY,CAN1,CAN 1] %+ [CATEGORY,CAN2,CAN 2] %+ [CATEGORY,CAN1.Signals,Signals,CAN1] %+ [CATEGORY,CAN1.Time,Time,CAN1] %+ [CATEGORY,CAN1.Raw,Raw,CAN1] %+ [CATEGORY,CAN2.Signals,Signals,CAN2] %+ [CATEGORY,CAN2.Time,Time,CAN2] %+ [CATEGORY,CAN2.Raw,Raw,CAN2]
#4261: Added a way to define memory regions without external page table header (SEGMENT + SEGMENT_ADDRESS). #4262: Add a way to assign a segment to a section of code with SEGMENT_BEGIN / SEGMENT_END. #4670: Simulink: If item can’t be placed in a segment, ginmake should raise an error. #3788: Added customizable output filename for Simulink builds via output_filename option in the Simulink options file. Added the built-in macro $(Name) for simulink option processing. Expands to ECU name in GIN file.
Added ability to specify ‘default’ value for ENUM (optlist) definitions. e.g. [ENUM=Bool,0,false,1,true,?,invalid]
Added section to the manual regarding the ecudef file format. Mentioned _GEMS_Initialize functions in the manual.
Updated to googletest 1.10.0. Simulink: Add items in functions whose names end with _GEMS_Initialize to initialization lists (to support latest matlab version).
#4116: Fixed application for attributes on frames extended IDs (e.g.)
GenMsgCycleTime.
#3986: Rename Option List => Enumeration. This is more in line with how similar
types of object in other tools & programming languages are named.
It also means that such objects are less easily confused with lists of
options in the GWv4 user interface.
Ginmake is still backwards compatible when building code that uses the old
OPTLIST and ol(name) terminology as opposed to ENUM and enum(name).
#3995: Added mechanism for specifying virtual version for simulink builds.
Macros $(BaseVersion) and ${ModelVersion) are available, as are environment
variables.
see virtual_version in simulink options file.
#4098: CAN RX node filtering should use the node referenced from the signals (receiving node) rather than the frame (transmitting node). The old behaviour can be retained by using: filter_rx_nodes_on_signals: false in the can options.
#4083: Fixed incorrect assignment of options lists (enumerations) in simulink builds. #4077: Matlab R2013b support: Added SamplingMode field to signals Can be turned off via generate: { sampling_mode: false }. #4077: Matlab R2013b support: Put signal generator functions in separate files Can use old behaviour by setting generate: { m_file_per_function: false }.
Do not include old name for CAN items if it is the same as its original name to avoid duplicate warnings. Support real_T for the time being for Simulink.. Ideally ginmake should be extended to support typedefs (including structs).
#3406: Categorise Simulink.Signals, Simulink.Parameters etc in output GIN.
Can be wired off in the simulink options file.
#3933: in_signals referenced in the initialization function are now placed in a separate initInSignals array to facilitate separate initialisation and reduced load on the main loop. The initialization code must be topped and tailed with // GEMS_Initialize_Begin and //GEMS_Initialize_End.
#3910: Fixed corruption of V1 ecudef files. Added additional check that GIN can be extracted from the output ecudef file to prevent the possibility of regressions in future.
Output Version ersion at the end of the build. Changed naming of CANRX frame related signals in output GIN files. #3880: Only import CAN signals as integer if multiply/offset are identity ([1 0]).
#3750: Document ASM segment handling.
Changed the way regions/segments are handled when building ASM source. For GIN files that use EEROM + EEROM2, these regions will now be separated in the output GIN file. It is now possible to generate arbitrary segments in ASM builds as for C builds and eerom segments will now be named.
#3841: Duplicate externs in from simulink code should not generate multiple instances. ginmake will check that duplicated externs are of the same type and size. Simulink: if errors occur during build, ginmake will now have a non-zero exit code (typically -1). #3801: Generate CAN RX frame timeout signals & getter functions. #3738: Generate ecudef .h/.c for embedding.
Internal project restructuring / updates to internal dependencies.
Fixed infinite loop when input .m file is empty. Fixed inport generation from setter functions.
Fixed breakpoint table referencing on lookup tables in the generated GIN file. #3557: Import descriptions from base GIN parameters into matlab workspace. Can be switched off with generate: workspace_descriptions:false. Import DBC signal comment into matlab signal description field. #3716: Ignore exe verson number in installer to allow install of prior version. #3729: Simulink CAN TX - use integer types for signals if possible. #3708: Reduce generated workspace file sizes by using factory function to create signals. Can be switched off with generate: workspace_optimize:false. #3495: Simulink - Create a version define containing the model version.
#3710, #3711. Added [HARDLIMITS,min,max] which is equivalent to VALIDRANGE except that is is specified in real (physical) values. Simulink Export: Min/Max are set as both LIMITS and HARDLIMITS unless overridden by special comments. Simulink: Don’t check for page boundary overlaps on items from base GIN. Do not emit page boundary overlap warnings if within a single segment (contiguous address range).
#3321: When legalizing matlab variable names, leading underscores are not valid. variables are now prefixed ‘a_’ instead & keep them at the start of alpha sorted lists. added generate:identity flag to simulink options. #3561: Import items from base gin as integer or boolean where possible. This new behaviour can be reverted to via generate: get_set_real_only: true in simulink options file. #3363: Support boolean and integer values from CAN RX. This new behaviour can be reverted to via can: rx_real_only: true #3671: Import can rx signals as integer/boolean.
Fixed bug generating model build ID. Was not taking into account headers critical to ABI because they had not been flushed to disk yet.
Added tx_name_prefix & rx_name_prefix options to simulink can configuration for prefixing names in the GIN file. #3679: Treat vector/matrix Simulink.Parameter objects as tables/maps. #3680: Simulink: Insert default Values from .m file into GIN
#3576: Pick up DataType from Simulink Table or Breakpoints sub-objects if not given by top-level object. #3573: Added option cantx_data_size with default of 12 and emit a TYPEDEF_SIZE directive.
Simulink: Added option canrx_data_size with correct default of 16.
Reset file ACLs following move. Removed user/organization option from installer.
Generate ECU_identity_size value.
More mods to alignment (do not use arrays). Fixed alignment padding calculation. Sort items in generated externs file based upon segment to reduce confusion. Insert some additional comments for readability to generated externs file.
Modified alignment methodology for simulink builds.
#3560: Simulink: Add support for boolean types from user workspace. Boolean types are given a ‘bool’ attribute for later editing enhancement in GW. #3432: Simulink: Support integer types and doubles from user workspace.
#3461: Generate Build ID for generated model code based upon hash of important output files (excluding comments) + the base GIN file. Generate embeddable identity file. Include model build ID in GIN file + ecudef file. Include model versions in extended identity.
Updated to VS2019
Updated to boost 1.71
#3460: Include simulink model version in generate gin file name.
Can be switched off with generate: { gin_append_model_version: false }.
Will also generate a text file containing the path to the generated gin file
for use by other build tools etc.
#3307: Simulink: added options tx_nodes and rx_nodes for CAN DBC import to
filter the DBC based upon frame sending node.
Installation of GIN files as compressed ecudef files can be enabled by setting
environment variable GINMAKE_INSTALL_ECUDEF = “1”. This is not enabled by
default until there is wider support by all GEMS software.
Generate compressed ecudef version of the GIN file.
SHA1 hash of the GIN file is output to the console.
#3456: Ginmake-simulink license option.
#3375: Simulink: Added ability to specify limits in comments
with fields: min,max,min_raw,max_raw
e.g. %$ min: 10
%$ max: 1000
Added [LIMITS,min,max] which is equivalent to VIEWRANGE except that is is
specified in real (phsysical) values.
#3435: Added an option to export all variables from m files to externs.h
generate: { unused_externs:true }
#3510: Simulink: parse the Min and Max fields apply these to the GIN file.
#3168: Simulink: per-object segment override option.
Output endian for all parameters.
#3360: Fixed address offsets of CANRX data. #3359: Fixed documentation regarding regions vs segments. Added endian option to segment items in simulink options file. Fixed assignment of region endian mode to region objects. Generate parameters for individual CAN frame bytes. Can be turned off with generate: { can_frame_bytes: false } Require SC_is_near_zero(f) function for bit signals. Avoid emitting sign mismatch warnings when underlying type is not a built-in.
#3333: Simulink: Special handling for bit based values.
GIN version 3.32. Added per-object / per-region endian modes. Changed the way raw values are dealt with in the gemscom library. #3326: Simulink DBC import - generate gems parameters for DBC signals. Include compiled GIN version in output messages. SHL and SHR expressions for shifting following masking (avoids needing to do this with the multiplier). BIT expressions as a terser way of expressing a mask + shift, similar to DBC bit offset + length.
#3328: Simulink: swap X/Y breakpoint table linkage on generated maps. Simulink: Set writable flag for option/table/map.
Simulink: Changed the way externs are processed.
Evaluate all externs in simulink generated header.
Fixed parse failure resulting in aborted compilation for C source where the segment directive contains non-prefixed hex numbers.
#3309: Simulink: Do not export CAN frames reserved for unassigned signals. #3304: Simulink: Autogenerated can_tx.h now has an include guard.
Include CAN tx rate (from GenMsgCycleTime, if present otherwise default to 10) in CANTx_FrameConfig. Added default_tx_rate to can port config in simulink options file. Simulink codegen: CAN tx functions should have a return type of ‘void’. CAN tx: generate pre-baked packing of CAN signals to reduce firmware overhead.
Catch more syntax errors in JSON parser. e.g. rx:[“foo”] tx:[“bar”] would parse successfuly even though syntactically incorrect and the resulting document would not be correct either. Refactored error handling code to avoid crosstalk in unit tests.
#3297: Fixed Matlab parsing of fractional doubles.
#3294: Fixed incorrect scaling of items due to incorrectly parsing floating point numbers as (int . int). Added unit test to cover this. #3296: CAN dbc paths in simulink options file should be relative to the options file, not the working directory. #3240: Account for new DeltaTime field in CAN RX data structure. #3284: Raise an error if simulink file_prefix is not a valid MATLAB identifier. #1622: Feature: Range based construction of parameter tables.
#3230: externs.h file now includes rtwtypes.h #3233: Do not insert NULL chars for CAN_Rx_FrameConfig. #3232: User Hex representation for CAN IDs in simulink CAN config source files. #3234: Define CAN frame count macros. #3239: Do not use relative paths for headers in can workspace files. #3228: Fixed problem with out_dir_workspace and file_prefix not being applied correctly.
Generate CANRX signals from DBC file and frame timing information signals. #3212: Added segments:[…] option to simulink-options for defining memory segments. Added parameters for viewing CAN rx time / frame data (DBC signals -> parameters not implemented yet as will require new GIN file version).
#3217: Fixed missing brackets in SC_round function. #3216: Disabled generation of units for the time being - some units in the base GIN file may not be acceptable unit expressions. #3218: Simulink: If there are duplicate object names in the GIN file, generate disambiguated names. #3219: Separate output dirs for generated gin/workspace/code. Improved error message if Json parse of simulink options fails to include line/column. Added TYPEDEF_SIZE directive.
Installer package. Fixed: Version details were not being embedded in the compiled exe. Copy simulink description field as a ginmake [DESCRIPTION,…] directive. Escape units and name in ginmake comments generated from simulink. Enabled multiple ginmake comments to be specified in simulink workspace file for aliases and also other directives. Added more readable option for specifying ginmake object fields in matlab workspace files (see manual for whats available). Added INPUTS and OUTPUTS directives for the purpose of defining audit chains in the GIN file. At some point this will enable generating audit graphs. Fixed C lexing error for hex numbers with letter e or E in them. Emit warnings if unrecognised options are specified in the simulink options file.
Simulink: Section placement for externs. ginmake style comments are now supported in user.m workspace file. Use %$ for object comments before the assignment of the simulink object constructor. Use %+ for other ginmake comments (e.g. for defining option lists). Merged GIN file is now generated from the generated externs header. Added _DEFINE directive to enable preprocessor symbol definition from ginmake comments alone. No longer generates “Extension GIN”. Only a merged GIN is generated. The merged GIN is now LZMA compressed and converted to a source code array for static inclusion into the CoPro firmware (for GW to download). Added options to control which files are generated by simulink export. This also allows the externs file to be hand edited and used to generate the merged gin if desired. Simulink: Optionally use temporary files for output + compare before overwrite. Simulink: Now handles relative + absolute paths (relative to options file). Fixed some compilation issues in gems library when building with stricter C++ compilance. Added unit test to validate an ASM build.
Moved over to VS2017 and gemsbuild system. Refactored project to enable unit testing. Implemented basic matlab virtual machine for processing simulink workspace files. Implemented parsing of simulink generated model code to extract used get/set/externs. Implemented code generators for simulink support. [Incomplete]
#2384: Option to tag existing gins with customer access ids.
#1547: Added license dongle restriction. GIN version 3.31. Remove unicows.dll delayload - win98 no longer supported.
#1526: Added EQU annotations.
Added SIZEOF and ADDROFF directives. This enables aliasing of byte and word values. GW #859: Fixed: GINMAKE: Alignment of 16bit following a 32bit causes an overlap. #890: Fixed: ginmake does not handle ASM label & instruction on different lines.
Emit warning if parameter has an address of zero as it is then not usable in CAN telemetry / comcode options etc.
Command line option ‘-r’ to generate XREF and XREF files from source input.
Added output of original variable name + source code file/line and info into output gin. For users with staff dongles, this information will be displayed in the descriptions window in GWv4 versions 4.02.08+.
Added ’none’ checksum type option for [SEGMENT] definitions.
Fixed problem with custom segment definitions not having their size calculated correctly. As a result of this bug, it would also not correctly set the checksum size. Updated to latest GEMS libs. Updated to use MSVC2013 compiler.
Added ability to generate user-defined calibration regions from segments
in ASM code.
See ginmake docs:
[SEGMENT,<mem_type>,
Updated gems/gemscom libraries => possible fix for a issue with generating older version GIN files that would end up displaying parameter list bars at full scale always. Updated to boost 1.54 and fixed some build issues arising from that. Now building with SP1 compiler.
Added SEGMENT definitions for C compilations. Allows better configuration of the page table.
Fixed error in GIN serialization affecting GINS from version 2.28+.
GIN file version 3.30. 24/32/64 bit value support. IEEE 32bit/64bit raw value support.
Added type specifiers for raw/real values. Allows the underlying type to be overidden for some things such as function table /option list raw values. Format: @Nt:VALUE
Where 'N' is the number of bytes in the value (1,2,3,4 or 8).
If 'N' is zero, the value is undefined.
Where 't' is the type:
i = signed integer
u = unsigned integer
f = floating point
e.g.
@4i:1234567
@2u:65535
Multiplier values may be specified as a numerator and denominator for integer scaling (requires the use of typespec’d values in the Scalar field of definitions). If you are using 64bit integer values then scaling in this way may be neccessary as the value would potentially not be representable using ‘double’. e.g. @8u:1/@8u:0x10000000
Issue fatal error if ASM compilation does not specify segments and ginmake attempts to assign addresses to objects (instead of crashing). Update gems/gemscom libraries.
Include site count and actual site count in function table warning message about site counts not matching. Fixed potential crash processing indirect axis options. Fixed error message “X is outside of EEROM space.” Fixed icorrect lookup of option lists by name if there are option lists with no items (e.g. if ;[OPTLIST] is seen).
GIN file version now at 3.29.
Fixed single character format strings being ignored.
Updated libraries.
Fixed storage of format strings in user scalars.
Added ability to set formatters for table/map axes.
Use a semicolon separated list in the base/format field to specify axis
formatters.
GIN file version now at 3.28. GWv4 ticket #791: Dynamic object names i.e. map/table/option/parameter names can be based on an option that has an option list, much in the same way as dynamic user scalars.
A dynamic name option may be specified by adding the name of an option in
square brackets.
You should also specify a static name for the object.
If one is not specified then the variable name will be used.
e.g. [Fuel A[Fuel A Name],...]
or [[Fuel A Name]Fuel A,...]
This specifies that the 'Fuel A Name' option should be used to pick up the
dynamic name. The static name is 'Fuel A' and this is used in calibration
conversions and comparisons.
Options used for the selector MUST have an option list associated with it,
otherwise an error will be issued.
The option list may have empty items in it that will cause the object to
default to it's static name.
Updated gems libs. Fixed possible crash in gems::ConvertOemToAnsi. Since Windows 98 compilation was broken in 1.54 by uprades to dependent libraries, the build has been moved to the VS2008 IDE to be in-line with all other projects to reduce maintainence overhead. Windows 98 will no longer be supported.
GIN file version now at 3.27.
Hidden flag using ‘!’ at start of object name (similar to usage of ‘’). May be
combinded with ‘’.
Indirect axis table/parameters.
Dynamic user scalar units.
GIN file version now at 3.26.
Added support for remote feature upgrade.
Optimized alias checking step.
Optimized a few string handling routines.
Reduced temporary string allocation significantly.
Added ECU_STRING object definition:
example ds.b 6 ;[ECU_STRING,Example]
Added ability to specify a formatting string for options, parameters, tables, maps etc. This allows decimal places etc to be specified. This is specified by adding a format string in the ‘base’ field of options/tables/maps/parameters, where you normally specify hex/decimal. e.g. #.# for 1 decimal place.
Updated internal libraries.
ASM Page table parser: Can now add a ‘PAGETBLEND’ label in your code at the end of the page table to indicate that the end of the page table has been reached. This avoids some issues when processing some page table definitions that are followed by additional ds.? instructions that are not actually part of the page table.
No longer parses commented out lines in page table definitions.
Use ‘server’ for names database rather than fixed IP address.
Fixed handling of METAFILE definitons.
Fixed preprocessor exclusions when compiling C code.
Lifted restriction of pagetbl being only 32 bytes long in ASM build as its size cannot be reliably calculated.
GIN file version now 3.25.
Fix handling of closing brace at end of C style page table if it is on its own line.
PAGETBLV2 handling, allows multi-region calibration space for use with extended protocol.
Added warnings when using PAGETBLV2 for parameter space objects that span page boundaries.
Added errors for EEROM region spanning objects.
Added optimizations to pre-processor. Added optimizations to reference resolving algorithm.
Fixed incorrect protocol/connection warning when archiving pre 3.24 version GIN files.
Only output note about alias conflicts if there were any aliases.
GIN file version now 3.24
Implemented extended comms protocol. CONNECTION definition: COM connections must define baud rate. PROTOCOL definition: added max read and max write options. PROTOCOL definition: Made it possible to associate a protocol with a connection type.
No longer an error not to add a comma for the parent category reference part of a CATEGORY definition.
Use map lookup in definition parse (should improve performance).
Added [XMLDESCRIPTIONS]. Allows objects to be described in an external XML file that can either be embedded in the GIN file or supplied in the GWv4 distribution.
Delay load libmysql.dll to reduce startup time if names database checking is not required (and also avoid the need for the dll if not used).
Delay load unicows.dll.
Changed optimization settings.
Added inline comment conditionals that only apply to the next definition rather than the entire line. e.g. ;[_IF1,(OMEX != 2)][Fuel Mod,…] ;[_IFDEF1,OMEX]… ;[_IFNDEF1,OMEX]… If any definitions directly following an _IF1, _IFDEF1 or _IFNDEF1 are other inline preporcessor directives or _WARN directives, then they are ignored and the next ’normal’ definition afther this is retained or rejected.
Implemented local warning supression with _WARN.
e.g:
//; [_WARN,4019][some expression that generates warning 4019]
Added METAFILE definition for use with output pin config feature.
Initially this will be an xml file that is manually generated to include in the
gin. In this situation, it must be called pin_config.
e.g.
//[METAFILE,pin_config,aem25_pin_config.xml]
Added ability to specify %n and/or %v in the specific output gin file name (-o option). This allows you to tailor the output gin file name. e.g. -o"%n-%v.gin" would output the name as NAME-VER.gin rather than NAMEVER.gin. In some cases this makes the output file name easier to read.
Added warning for when sign of underlying type does not match sign field.
Only emit an alias warning if the aliased objects has mismatched option lists or non-identical overlapping bitmasks.
Use modified version of 14bit protocol. Old version is now invalid.
Moved project to SVN.
Support labels in PAGETBL in asm builds. Also extended support for dc.l in pagetbl. dc.b is now ignored for backwards compatibility with 24bit pagetbls.
Fixed installation of GIN files, should the user have the gin files directory specified with a trailing backslash.
Fixed broken padding in user scalar records in archive versions prior to 3.15.
Linked against Microsoft Layer for Unicode so as to support windows 98.
If build fails when in source code update mode, don’t update the source code.
Summary of new features in 3.23 GIN files:
More in depth on the new features / other changes:
Made ATTRIBUTES definition able to have values assigned to each attribute. e.g. [ATTRIBUTES,attr1 = value1, attr2=value2]
Added CONNECTION definition. This allows connection methods to be defined: [CONNECTION,COM,38400] [CONNECTION,FTDI] [CONNECTION,LIBUSB] The idea behind this is so that the user can select which ECU they are connecting to in the case of connection problems. The user can be aided via a wizard using this information by making sure that they have the correct port settings. There may be multiple connection types if required (e.g. X25 has COM and LIBUSB). An error will be given if no connections are defined and the GIN file version being compiled is v3.23+.
Now using unicode strings internally.
As of v3.23 gin files, strings are stored in UTF8, so that it is possible to have unicode characters names that would otherwise not be possible. Such characters will only currently work in GWv4, NOT GWv3 (unless they can be mapped into the codepage of the windows version being used. This will vary depending on the language of the windows installation).
It is now possible to use entity references in strings. These are very similar
to HTML entity references, but they have a different syntax - the ‘&’ and ‘;’
characters are replaced with the $ symbol.
e.g.
< codes for ‘<’
This becomes:
$lt$ in ginmake speak.
Entity references enable us to circumvent the issuse of the DOS and ANSI code
pages not entirely overlapping one another and also allows other special
characters that may not be present in these codepages.
For example the capital ‘omega’ symbol is in the DOS codepage, but not in the
ANSI codepage. The symbol can now be represented with ‘$Omega$’.
There is a list of all supported entities in the ginmake manual under the
new “String Handling” section.
If you find that an entity is not supported, you can enter the value of the code-point directly. e.g. These each code for Omega. $Omega$ $#x03A9$ $#937$ Be aware that entities are case sensitive. $Omega$ and $omega$ are not the same!
As of v3.23 gin files, names and units are no longer length restricted.
ParameterTable objects could not be successfully built. Definition now changed to be common to table axis generation.
Added DESCRIPTION tag, so that items can be given inline descriptions for additional information in the user interface. For example, options can be given a description that would be displayed as a tooltip in GWv4.
Added META tag, so that GIN file gan be given ‘global’ attributes (meta information). This will initially be used for naming CAN telemetry channels: [META,CAN_CHANNEL_NAME,1,Vehicle CAN] [META,CAN_CHANNEL_NAME,2,Engine CAN]
Updated Manual.
UNTRACKED - Preprocessor expressions were not being correctly evaluated. e.g. #if (2 == 2) would not compile.
UNTRACKED - Added inline comment conditionals: e.g. ;[_IF,(OMEX != 2)][Fuel Mod,…] ;[_IFDEF,OMEX]… ;[_IFNDEF,OMEX]…
These conditionals work up to the end of the whole comment -
if the expression evaluates to false, then the rest of the comment
is excluded from parsing.
UNTRACKED - Implemented source code update of names, old names and categories
from another template GIN. The GIN is supplied with the command
line switch ‘-g[filename]’, filename being the path to the template
GIN. The intention is to use the namesdb application to generate a
gin file using appropriate categorization. You then use this GIN
file as a parameter to the build of your GIN file.
Ginmake will compile the GIN and then compare it with the modified
GIN file. Places that were different will be updated in the source
code at the end of the compile.
Once this is done, you should attempt a normal compile again to
check that everything is OK. In some situations you may end up with
duplicate names or undefined references, which for now will need to
be updated manually. The task is at least not as onerous as manual
categorization.
It is recommended that you back-up your source code before doing this
in case it goes wrong.
UNTRACKED - If a field had only a category or profile reference in it, then compilation would fail and the implicit writablilty of the item would not be assumed.
UNTRACKED - Emit an error if there are duplicated values in an option list.
UNTRACKED - Detect when gemscom addressable space has been exceeded.
UNTRACKED - Allow uppercase preprocessor directives.
UNTRACKED - Fix crash when CHKLOC or CRCLOC is defined before a Region object has been created for the GIN file.
UNTRACKED - Define WINVER for Windows98.
UNTRACKED - Regressed compiler to VS2005 so that executable still runs on Windows 98.
UNTRACKED - Added option in interactive mode to end the interactive session but still display name-check warnings.
UNTRACKED - Fixed incorrect warning types when checking database names in non-interactive mode.
UNTRACKED - GIN file version updated to v3.22.
UNTRACKED - Allow items to be added to MAIN_PROFILE.
UNTRACKED - Added checking of names against the names database.
UNTRACKED - Added interactive shell for updating the database.
UNTRACKED - Implemented “categories” feature.
UNTRACKED - Allow -ve raw values for valid range and view range.
UNTRACKED - Default value initializer using x_ and y_ was inserting values in row-major rather than column major ordering.
UNTRACKED - Continuation characters (a ‘' char) are now only applied to preprocessor lines (i.e. those that begin with a ‘#’ character).
UNTRACKED - Updated serialization routine for version3 serialize (new attributes were not being saved).
UNTRACKED - Implemented function-like macros in the pre-processor.
UNTRACKED - Added VALUES tag for specifying default value initializers.
UNTRACKED - Added ATTRIBUTES for tagging types with metadata (e.g. ‘fuel’).
UNTRACKED - Added VALIDRANGE to enable validation of calibrations to ensure that specified objects have sensible values.
UNTRACKED - Added VIEWRANGE to enable an object to specify a default range for views such as table graphs and maps, assuming that the object only normally uses a small portion of its full raw range.
UNTRACKED - Made it an error to have a comm-code object that is not large enough to store a comm-code.
UNTRACKED - Added new gin file version 3.19.
UNTRACKED - CRC checksum type is now stored correctly in the gin file.
UNTRACKED - Checksum reference size is now stored correctly for regions.
UNTRACKED - Updated to use latest gemscom library.
UNTRACKED - Added support for GWv4 installation.
UNTRACKED - Added optional install versions specifier to -i command line switch.
UNTRACKED - Added new gin file version 3.18.
UNTRACKED - Added LOGGINGSIZE definition for 3.18 gins.
UNTRACKED - Store name of option lists in 3.18 gins.
i.e. [OPTLIST=Baudrate] will display as “Baudrate” in GWE2 as
well as be used for name based lookup in Ginmake.
UNTRACKED - Updated documentation.
UNTRACKED - Fixed a regression in the steps/start/offset field handling code.
The initial evaluation of the field to replace preprocessor symbols
and expressions was causing an error to be emitted for fields that
contained valid option references.
The replacement is now attempted without emitting an error and
subsequently checked to see if it could be an option name.
Also fixes a pontential issue where bracketed expressions would not
have been evaluated and immediately considered to be an option name.
UNTRACKED - Applied a couple of optimizations to field parsing code to reduce heap allocations and string processing. Refactored some duplicate code in this area.
UNTRACKED - Error for ’numeric base’ field was displaying the value in the ‘floating point’ field.
UNTRACKED - Name was not being set on option lists (still not saved in gin file)
UNTRACKED - Use of uninitialised variables that could lead to silent exclusion of objects.
UNTRACKED - Neglected to replace symbols in offset field of axes.
UNTRACKED - Fix bug introduced in previous version where preprocessor symbols would not be correctly evaluated for map steps/start/offset fields.
UNTRACKED - Fix issue with offset option fixup.
UNTRACKED - Having option start/offset on the axis of a table or map did not set the object up as having ‘option steps’.
UNTRACKED - Steps option is now retreived from ‘steps’ field, not the parameter/table field.
UNTRACKED - Fixed false duplicate object warnings when ‘old names’ are used.
UNTRACKED - Removed requirement for option start/offset from having to be enclosed in brackets.
UNTRACKED - Bracketed references were not removed correctly from field strings leading to erroneous definition errors.
This means that it is possible to use the new-style option list
references with multipliers. i.e. option lists can be used on
masked values:
;[OPTLIST=PullUpList,0,No Pullup,1,1k,2,100]
;[Pull up A1,,256 ol(PullUpList),,o,,,$3,]
;[Pull up A2,,64 ol(PullUpList),,o,,,$C,]
UNTRACKED - Rebuilt with updated gems + gemscom libraries. Appears to have fixed a bug causing an invalid address fixup with Lancer+8 v1.02 build.
UNTRACKED - Optimized comment parser slightly (reduced heap allocation frequency).
UNTRACKED - chksm, chkloc and crcloc addresses were not being fixed up.
UNTRACKED - Types that have a ‘real’ value in the offset field (preceeded with
a ‘’ character were not being processed correctly (the ‘’ was
not being trimmed from the string during parsing. This would mean
that the conversion to a floating point number would fail).
The result is that the compiler raises an error indicating that
the field contains an invalid expression.
Additionally the compiler would subsequently crash when checking
aliases due to the object not being correctly constructed.
UNTRACKED - Fix crash when checking aliases if gin object not created by
common type builder due to a failure in its construction.
Builders are now elided from all processes post-parsing to preempt
any other issues.
UNTRACKED - Error message indicating that a map could not be found said that a table could not be found.
UNTRACKED - Separate profiles with semicolon rather than pipe characters.
UNTRACKED - Allow user to disable automatic alignment from the command line options.
UNTRACKED - Fix file extension bug.
UNTRACKED - Name based referencing for map modifiers was losing the last character.
UNTRACKED - Removed profiles from log maps.
UNTRACKED - Made it possible to have multiple profiles per object.
UNTRACKED - Reserve address 0x00000000 for ECU objects when NOT using the 13bit protocol.
This address is reserved so that we don't get problems when using
addresses of parameters as the value of other objects.
An example of this is when addresses are stored for logging purposes.
UNTRACKED - Support for ‘old names’ whereby names are separated by semicolons.
UNTRACKED - Support for ‘ignore in conversion’ feature
UNTRACKED - Add new warnings for aliased items
UNTRACKED - Add warning supression
UNTRACKED - Add ’treat warnings as errors’ feature
UNTRACKED - Add Generate file name feature for HTG2
UNTRACKED - Add Install Gin feature for HTG2
UNTRACKED - Add version list feature for HTG2
UNTRACKED - Fix issue with SDATA segment and AEM25
UNTRACKED - Output warning for read only options.
UNTRACKED - ‘-o’ command line option could be set, but was bypassed from checking of arguments, so compile would not run.
UNTRACKED - Inclusion of files inherits parent file’s path (e.g. for GRH files the pathe of included files is relative to the GRH, rather than the current working directory.
UNTRACKED - Warn if PCTL, PACK or STAT1 are not defined.
UNTRACKED - Fix issue whereby function tables would not be written into the gin.
UNTRACKED - Boolean conversion from ‘y’ could silently fail.
UNTRACKED - Updated gems + gemscom libraries and addressed breaking changes.
UNTRACKED - Raw and real sites were round the wrong way in the function table builder.
UNTRACKED - Some preparations for storing all strings in Ansi/unicode format in new gin file types.
UNTRACKED - For version 3 gin files, always set the logtbl to be a base size of a byte. This is because having its correct size breaks GWv3. An informational message is output to indicate that this has happened.
UNTRACKED - ASM compilation was not advancing data location, leading to incorrect addresses
UNTRACKED - Option user scalars were not setting the flag to indicate that they use options for thier scalar and offset
UNTRACKED - Elements in data definitions were not being trimmed of whitespace at the ends of each string.
UNTRACKED - Data location was not being updated with the current segment offset when changing segments.
UNTRACKED - Modifier parameters were not being assigned the map index that they modify.
UNTRACKED - Added build errors for when REV_NAME and/or REV_VERSION are not defined.
UNTRACKED - Changed warning ID’s so that they are unique and do not conflict with compiler error id’s. This gives the opportunity for a flag to be made available that gets the compiler to treat warnings as errors.
UNTRACKED - Was not setting the Min value and Max value of items such as parameters. Note that in HTG, these values were being incorrectly set anyway as it was not taking into account the sign of the number. This shouldn’t have been a problem in practice, because these values are degenerate and are recalculated when the gin file is loaded.
UNTRACKED - Misleading warning message - if command line option -p and -q used together, a warning would be reported that options -q and -o were used. The warning now reports that -o OR -p were used with -q.
UNTRACKED - Suppress duplicate warning when a table has the same name as the parameter used as its axis. Since a table canot use itself as a table axis, the parameter is used and no warning is given.
UNTRACKED - Duplicates warning on axis parameters was giving incorrect line numbers.
Initial release
List of Supported Character Entities
Character entities may be used within strings to insert special characters. See String Handling / Entity References.
| Name | Character | Unicode code point | Description |
| quot | " | U+0022 (34) | quotation mark (= APL quote) |
| dollar | $ | U+0024 (36) | dollar symbol |
| amp | & | U+0026 (38) | ampersand |
| apos | ' | U+0027 (39) | apostrophe (= apostrophe-quote); |
| lt | < | U+003C (60) | less-than sign |
| gt | > | U+003E (62) | greater-than sign |
| nbsp | U+00A0 (160) | no-break space (=non-breaking space) | |
| iexcl | ¡ | U+00A1 (161) | inverted exclamation mark |
| cent | ¢ | U+00A2 (162) | cent sign |
| pound | £ | U+00A3 (163) | pound sign |
| curren | ¤ | U+00A4 (164) | currency sign |
| yen | ¥ | U+00A5 (165) | yen sign (= yuan sign) |
| brvbar | ¦ | U+00A6 (166) | broken bar (= broken vertical bar) |
| sect | § | U+00A7 (167) | section sign |
| uml | ¨ | U+00A8 (168) | diaeresis (= spacing diaeresis); see German umlaut |
| copy | © | U+00A9 (169) | copyright sign |
| ordf | ª | U+00AA (170) | feminine ordinal indicator |
| laquo | « | U+00AB (171) | left-pointing double angle quotation mark (= left pointing guillemet) |
| not | ¬ | U+00AC (172) | not sign |
| shy | U+00AD (173) | soft hyphen (= discretionary hyphen) | |
| reg | ® | U+00AE (174) | registered sign ( = registered trade mark sign) |
| macr | ¯ | U+00AF (175) | macron (= spacing macron = overline = APL overbar) |
| deg | ° | U+00B0 (176) | degree sign |
| plusmn | ± | U+00B1 (177) | plus-minus sign (= plus-or-minus sign) |
| sup2 | ² | U+00B2 (178) | superscript two (= superscript digit two = squared) |
| sup3 | ³ | U+00B3 (179) | superscript three (= superscript digit three = cubed) |
| acute | ´ | U+00B4 (180) | acute accent (= spacing acute) |
| micro | µ | U+00B5 (181) | micro sign |
| para | ¶ | U+00B6 (182) | pilcrow sign ( = paragraph sign) |
| middot | · | U+00B7 (183) | middle dot (= Georgian comma = Greek middle dot) |
| cedil | ¸ | U+00B8 (184) | cedilla (= spacing cedilla) |
| sup1 | ¹ | U+00B9 (185) | superscript one (= superscript digit one) |
| ordm | º | U+00BA (186) | masculine ordinal indicator |
| raquo | » | U+00BB (187) | right-pointing double angle quotation mark (= right pointing guillemet) |
| frac14 | ¼ | U+00BC (188) | vulgar fraction one quarter (= fraction one quarter) |
| frac12 | ½ | U+00BD (189) | vulgar fraction one half (= fraction one half) |
| frac34 | ¾ | U+00BE (190) | vulgar fraction three quarters (= fraction three quarters) |
| iquest | ¿ | U+00BF (191) | inverted question mark (= turned question mark) |
| Agrave | À | U+00C0 (192) | Latin capital letter A with grave (= Latin capital letter A grave) |
| Aacute | Á | U+00C1 (193) | Latin capital letter A with acute |
| Acirc | Â | U+00C2 (194) | Latin capital letter A with circumflex |
| Atilde | Ã | U+00C3 (195) | Latin capital letter A with tilde |
| Auml | Ä | U+00C4 (196) | Latin capital letter A with diaeresis |
| Aring | Å | U+00C5 (197) | Latin capital letter A with ring above (= Latin capital letter A ring) |
| AElig | Æ | U+00C6 (198) | Latin capital letter AE (= Latin capital ligature AE) |
| Ccedil | Ç | U+00C7 (199) | Latin capital letter C with cedilla |
| Egrave | È | U+00C8 (200) | Latin capital letter E with grave |
| Eacute | É | U+00C9 (201) | Latin capital letter E with acute |
| Ecirc | Ê | U+00CA (202) | Latin capital letter E with circumflex |
| Euml | Ë | U+00CB (203) | Latin capital letter E with diaeresis |
| Igrave | Ì | U+00CC (204) | Latin capital letter I with grave |
| Iacute | Í | U+00CD (205) | Latin capital letter I with acute |
| Icirc | Î | U+00CE (206) | Latin capital letter I with circumflex |
| Iuml | Ï | U+00CF (207) | Latin capital letter I with diaeresis |
| ETH | Ð | U+00D0 (208) | Latin capital letter ETH |
| Ntilde | Ñ | U+00D1 (209) | Latin capital letter N with tilde |
| Ograve | Ò | U+00D2 (210) | Latin capital letter O with grave |
| Oacute | Ó | U+00D3 (211) | Latin capital letter O with acute |
| Ocirc | Ô | U+00D4 (212) | Latin capital letter O with circumflex |
| Otilde | Õ | U+00D5 (213) | Latin capital letter O with tilde |
| Ouml | Ö | U+00D6 (214) | Latin capital letter O with diaeresis |
| times | × | U+00D7 (215) | multiplication sign |
| Oslash | Ø | U+00D8 (216) | Latin capital letter O with stroke (= Latin capital letter O slash) |
| Ugrave | Ù | U+00D9 (217) | Latin capital letter U with grave |
| Uacute | Ú | U+00DA (218) | Latin capital letter U with acute |
| Ucirc | Û | U+00DB (219) | Latin capital letter U with circumflex |
| Uuml | Ü | U+00DC (220) | Latin capital letter U with diaeresis |
| Yacute | Ý | U+00DD (221) | Latin capital letter Y with acute |
| THORN | Þ | U+00DE (222) | Latin capital letter THORN |
| szlig | ß | U+00DF (223) | Latin small letter sharp s (= ess-zed); see German Eszett |
| agrave | à | U+00E0 (224) | Latin small letter a with grave |
| aacute | á | U+00E1 (225) | Latin small letter a with acute |
| acirc | â | U+00E2 (226) | Latin small letter a with circumflex |
| atilde | ã | U+00E3 (227) | Latin small letter a with tilde |
| auml | ä | U+00E4 (228) | Latin small letter a with diaeresis |
| aring | å | U+00E5 (229) | Latin small letter a with ring above |
| aelig | æ | U+00E6 (230) | Latin small letter ae (= Latin small ligature ae) |
| ccedil | ç | U+00E7 (231) | Latin small letter c with cedilla |
| egrave | è | U+00E8 (232) | Latin small letter e with grave |
| eacute | é | U+00E9 (233) | Latin small letter e with acute |
| ecirc | ê | U+00EA (234) | Latin small letter e with circumflex |
| euml | ë | U+00EB (235) | Latin small letter e with diaeresis |
| igrave | ì | U+00EC (236) | Latin small letter i with grave |
| iacute | í | U+00ED (237) | Latin small letter i with acute |
| icirc | î | U+00EE (238) | Latin small letter i with circumflex |
| iuml | ï | U+00EF (239) | Latin small letter i with diaeresis |
| eth | ð | U+00F0 (240) | Latin small letter eth |
| ntilde | ñ | U+00F1 (241) | Latin small letter n with tilde |
| ograve | ò | U+00F2 (242) | Latin small letter o with grave |
| oacute | ó | U+00F3 (243) | Latin small letter o with acute |
| ocirc | ô | U+00F4 (244) | Latin small letter o with circumflex |
| otilde | õ | U+00F5 (245) | Latin small letter o with tilde |
| ouml | ö | U+00F6 (246) | Latin small letter o with diaeresis |
| divide | ÷ | U+00F7 (247) | division sign |
| oslash | ø | U+00F8 (248) | Latin small letter o with stroke (= Latin small letter o slash) |
| ugrave | ù | U+00F9 (249) | Latin small letter u with grave |
| uacute | ú | U+00FA (250) | Latin small letter u with acute |
| ucirc | û | U+00FB (251) | Latin small letter u with circumflex |
| uuml | ü | U+00FC (252) | Latin small letter u with diaeresis |
| yacute | ý | U+00FD (253) | Latin small letter y with acute |
| thorn | þ | U+00FE (254) | Latin small letter thorn |
| yuml | ÿ | U+00FF (255) | Latin small letter y with diaeresis |
| OElig | Œ | U+0152 (338) | Latin capital ligature oe[5] |
| oelig | œ | U+0153 (339) | Latin small ligature oe[6] |
| Scaron | Š | U+0160 (352) | Latin capital letter s with caron |
| scaron | š | U+0161 (353) | Latin small letter s with caron |
| Yuml | Ÿ | U+0178 (376) | Latin capital letter y with diaeresis |
| fnof | ƒ | U+0192 (402) | Latin small letter f with hook (= function = florin) |
| circ | ˆ | U+02C6 (710) | modifier letter circumflex accent |
| tilde | ˜ | U+02DC (732) | small tilde |
| Alpha | Α | U+0391 (913) | Greek capital letter Alpha |
| Beta | Β | U+0392 (914) | Greek capital letter Beta |
| Gamma | Γ | U+0393 (915) | Greek capital letter Gamma |
| Delta | Δ | U+0394 (916) | Greek capital letter Delta |
| Epsilon | Ε | U+0395 (917) | Greek capital letter Epsilon |
| Zeta | Ζ | U+0396 (918) | Greek capital letter Zeta |
| Eta | Η | U+0397 (919) | Greek capital letter Eta |
| Theta | Θ | U+0398 (920) | Greek capital letter Theta |
| Iota | Ι | U+0399 (921) | Greek capital letter Iota |
| Kappa | Κ | U+039A (922) | Greek capital letter Kappa |
| Lambda | Λ | U+039B (923) | Greek capital letter Lambda |
| Mu | Μ | U+039C (924) | Greek capital letter Mu |
| Nu | Ν | U+039D (925) | Greek capital letter Nu |
| Xi | Ξ | U+039E (926) | Greek capital letter Xi |
| Omicron | Ο | U+039F (927) | Greek capital letter Omicron |
| Pi | Π | U+03A0 (928) | Greek capital letter Pi |
| Rho | Ρ | U+03A1 (929) | Greek capital letter Rho |
| Sigma | Σ | U+03A3 (931) | Greek capital letter Sigma |
| Tau | Τ | U+03A4 (932) | Greek capital letter Tau |
| Upsilon | Υ | U+03A5 (933) | Greek capital letter Upsilon |
| Phi | Φ | U+03A6 (934) | Greek capital letter Phi |
| Chi | Χ | U+03A7 (935) | Greek capital letter Chi |
| Psi | Ψ | U+03A8 (936) | Greek capital letter Psi |
| Omega | Ω | U+03A9 (937) | Greek capital letter Omega |
| alpha | α | U+03B1 (945) | Greek small letter alpha |
| beta | β | U+03B2 (946) | Greek small letter beta |
| gamma | γ | U+03B3 (947) | Greek small letter gamma |
| delta | δ | U+03B4 (948) | Greek small letter delta |
| epsilon | ε | U+03B5 (949) | Greek small letter epsilon |
| zeta | ζ | U+03B6 (950) | Greek small letter zeta |
| eta | η | U+03B7 (951) | Greek small letter eta |
| theta | θ | U+03B8 (952) | Greek small letter theta |
| iota | ι | U+03B9 (953) | Greek small letter iota |
| kappa | κ | U+03BA (954) | Greek small letter kappa |
| lambda | λ | U+03BB (955) | Greek small letter lambda |
| mu | μ | U+03BC (956) | Greek small letter mu |
| nu | ν | U+03BD (957) | Greek small letter nu |
| xi | ξ | U+03BE (958) | Greek small letter xi |
| omicron | ο | U+03BF (959) | Greek small letter omicron |
| pi | π | U+03C0 (960) | Greek small letter pi |
| rho | ρ | U+03C1 (961) | Greek small letter rho |
| sigmaf | ς | U+03C2 (962) | Greek small letter final sigma |
| sigma | σ | U+03C3 (963) | Greek small letter sigma |
| tau | τ | U+03C4 (964) | Greek small letter tau |
| upsilon | υ | U+03C5 (965) | Greek small letter upsilon |
| phi | φ | U+03C6 (966) | Greek small letter phi |
| chi | χ | U+03C7 (967) | Greek small letter chi |
| psi | ψ | U+03C8 (968) | Greek small letter psi |
| omega | ω | U+03C9 (969) | Greek small letter omega |
| thetasym | ϑ | U+03D1 (977) | Greek theta symbol |
| upsih | ϒ | U+03D2 (978) | Greek Upsilon with hook symbol |
| piv | ϖ | U+03D6 (982) | Greek pi symbol |
| ensp | U+2002 (8194) | en space[7] | |
| emsp | U+2003 (8195) | em space[8] | |
| thinsp | U+2009 (8201) | thin space[9] | |
| zwnj | U+200C (8204) | zero-width non-joiner | |
| zwj | U+200D (8205) | zero-width joiner | |
| lrm | U+200E (8206) | left-to-right mark | |
| rlm | U+200F (8207) | right-to-left mark | |
| ndash | – | U+2013 (8211) | en dash |
| mdash | — | U+2014 (8212) | em dash |
| lsquo | ' | U+2018 (8216) | left single quotation mark |
| rsquo | ' | U+2019 (8217) | right single quotation mark |
| sbquo | ‚ | U+201A (8218) | single low-9 quotation mark |
| ldquo | " | U+201C (8220) | left double quotation mark |
| rdquo | " | U+201D (8221) | right double quotation mark |
| bdquo | „ | U+201E (8222) | double low-9 quotation mark |
| dagger | † | U+2020 (8224) | dagger |
| Dagger | ‡ | U+2021 (8225) | double dagger |
| bull | • | U+2022 (8226) | bullet (= black small circle)[10] |
| hellip | … | U+2026 (8230) | horizontal ellipsis (= three dot leader) |
| permil | ‰ | U+2030 (8240) | per mille sign |
| prime | ′ | U+2032 (8242) | prime (= minutes = feet) |
| Prime | ″ | U+2033 (8243) | double prime (= seconds = inches) |
| lsaquo | ‹ | U+2039 (8249) | single left-pointing angle quotation mark[11] |
| rsaquo | › | U+203A (8250) | single right-pointing angle quotation mark[12] |
| oline | ‾ | U+203E (8254) | overline (= spacing overscore) |
| frasl | ⁄ | U+2044 (8260) | fraction slash (=solidus) |
| euro | € | U+20AC (8364) | euro sign |
| image | ℑ | U+2111 (8465) | black-letter capital I (= imaginary part) |
| weierp | ℘ | U+2118 (8472) | script capital P (= power set = Weierstrass p) |
| real | ℜ | U+211C (8476) | black-letter capital R (= real part symbol) |
| trade | ™ | U+2122 (8482) | trademark sign |
| alefsym | ℵ | U+2135 (8501) | alef symbol (= first transfinite cardinal)[13] |
| larr | ← | U+2190 (8592) | leftwards arrow |
| uarr | ↑ | U+2191 (8593) | upwards arrow |
| rarr | → | U+2192 (8594) | rightwards arrow |
| darr | ↓ | U+2193 (8595) | downwards arrow |
| harr | ↔ | U+2194 (8596) | left right arrow |
| crarr | ↵ | U+21B5 (8629) | downwards arrow with corner leftwards (= carriage return) |
| lArr | ⇐ | U+21D0 (8656) | leftwards double arrow[14] |
| uArr | ⇑ | U+21D1 (8657) | upwards double arrow |
| rArr | ⇒ | U+21D2 (8658) | rightwards double arrow[15] |
| dArr | ⇓ | U+21D3 (8659) | downwards double arrow |
| hArr | ⇔ | U+21D4 (8660) | left right double arrow |
| forall | ∀ | U+2200 (8704) | for all |
| part | ∂ | U+2202 (8706) | partial differential |
| exist | ∃ | U+2203 (8707) | there exists |
| empty | ∅ | U+2205 (8709) | empty set (= null set = diameter) |
| nabla | ∇ | U+2207 (8711) | nabla (= backward difference) |
| isin | ∈ | U+2208 (8712) | element of |
| notin | ∉ | U+2209 (8713) | not an element of |
| ni | ∋ | U+220B (8715) | contains as member |
| prod | ∏ | U+220F (8719) | n-ary product (= product sign)[16] |
| sum | ∑ | U+2211 (8721) | n-ary summation[17] |
| minus | − | U+2212 (8722) | minus sign |
| lowast | ∗ | U+2217 (8727) | asterisk operator |
| radic | √ | U+221A (8730) | square root (= radical sign) |
| prop | ∝ | U+221D (8733) | proportional to |
| infin | ∞ | U+221E (8734) | infinity |
| ang | ∠ | U+2220 (8736) | angle |
| and | ∧ | U+2227 (8743) | logical and (= wedge) |
| or | ∨ | U+2228 (8744) | logical or (= vee) |
| cap | ∩ | U+2229 (8745) | intersection (= cap) |
| cup | ∪ | U+222A (8746) | union (= cup) |
| int | ∫ | U+222B (8747) | integral |
| there4 | ∴ | U+2234 (8756) | therefore |
| sim | ∼ | U+223C (8764) | tilde operator (= varies with = similar to)[18] |
| cong | ≅ | U+2245 (8773) | congruent to |
| asymp | ≈ | U+2248 (8776) | almost equal to (= asymptotic to) |
| ne | ≠ | U+2260 (8800) | not equal to |
| equiv | ≡ | U+2261 (8801) | identical to; sometimes used for ’equivalent to' |
| le | ≤ | U+2264 (8804) | less-than or equal to |
| ge | ≥ | U+2265 (8805) | greater-than or equal to |
| sub | ⊂ | U+2282 (8834) | subset of |
| sup | ⊃ | U+2283 (8835) | superset of[19] |
| nsub | ⊄ | U+2284 (8836) | not a subset of |
| sube | ⊆ | U+2286 (8838) | subset of or equal to |
| supe | ⊇ | U+2287 (8839) | superset of or equal to |
| oplus | ⊕ | U+2295 (8853) | circled plus (= direct sum) |
| otimes | ⊗ | U+2297 (8855) | circled times (= vector product) |
| perp | ⊥ | U+22A5 (8869) | up tack (= orthogonal to =perpendicular) |
| sdot | ⋅ | U+22C5 (8901) | dot operator[20] |
| lceil | ⌈ | U+2308 (8968) | left ceiling (= APL upstile) |
| rceil | ⌉ | U+2309 (8969) | right ceiling |
| lfloor | ⌊ | U+230A (8970) | left floor (= APL downstile) |
| rfloor | ⌋ | U+230B (8971) | right floor |
| lang | 〈 | U+2329 (9001) | left-pointing angle bracket (= bra)[21] |
| rang | 〉 | U+232A (9002) | right-pointing angle bracket (= ket)[22] |
| loz | ◊ | U+25CA (9674) | lozenge |
| spades | ♠ | U+2660 (9824) | black spade suit[23] |
| clubs | ♣ | U+2663 (9827) | black club suit (= shamrock)[24] |
| hearts | ♥ | U+2665 (9829) | black heart suit (= valentine)[25] |
| diams | ♦ | U+2666 (9830) | black diamond suit[26] |