ECU Definition Files
Overview
ECU Definition Files describe the memory layout of the ECU so that GWv4 can present the information stored in the ECU in a logical way and display/edit values using physical units such as Celsius or Fahrenheit rather then the internal representation used by the ECU.
Before you can connect to an ECU or edit Calibration Files, an ECU Definition File for the ECU will therefore need to be installed into GWv4.
Installation
There are a few ways to install ECU Definition Files:
- Drag & Drop your ECU Definition file onto GWv4 to install it.
- Open a Calibration or attempt to connect to an ECU. GWv4 will guide you through the process of locating an ECU definition file.
- Use the ECU Installations dialog. From the main menu go to and click the ‘Install…’ button.
The installation process archives ECU Definition files to an installation folder in the ProgramData folder in the EcuDef format.
ECU Definition File Formats
- GIN (*.gin) - GEMS Proprietary ECU Definition file.
- A2L (*.a2l) - ASAM Standard ECU Definition file. Requires an XCP License. A2L files have the file extension “.a2l”.
- EcuDef (*.ecudef)- Compressed archive that, amongst other things, contains either a GIN file or an A2L file. EcuDef files take up considerably less disk space than GIN or A2L files. EcuDef files can also contain other supporting files.
Tip
If you do not have an ECU Definition file for your ECU, in most cases you can download them (gems.co.uk/downloads). Alternatively, contact GEMS.
Calibration defaults
An ECUDEF package can contain a calibration aspect marked as DefaultsAspect.
Its values supply the Default Value commands and calibration initialization,
including for A2L definitions, which have no native default-value fields.
Loading these defaults does not change the current calibration. Only items
included in the aspect receive defaults; other items are left unchanged.
For A2L definitions with XCP ADDRESS_MAPPING segments, GWv4 also
reads defaults from the firmware source addresses when connected to the ECU.
Normal calibration access continues to use the mapped run-time addresses.
Defaults supplied by the ECUDEF package take precedence over firmware defaults.
Firmware defaults are unavailable offline until acquired during a connection.
The Online Firmware Defaults application preference controls online acquisition:
- Background (default): reads only when communications are idle, yielding to calibration transfers, cached writes and polling between bounded read chunks. An already-started chunk (at most 128 bytes) finishes before yielding.
- Immediate: queues the complete defaults read as a normal transfer; later calibration transfers wait for it to finish.
- Disabled: does not read firmware defaults. Packaged defaults remain available.
An EDX override can select a different mode for an ECU. Changes apply to active connections; defaults already acquired remain available.
Identity matching
When opening a calibration, connecting to an ECU or programming firmware,
GWv4 looks for an installed ECU definition with a compatible
identity. The required identity comes from the calibration, the connected
ECU or the firmware being programmed. A .FINX firmware package carries its
required identity in identity.json; this describes the new firmware, not
necessarily the firmware currently running in the ECU.
FINX packages can also carry the matching definition. See Including an ECU definition in a FINX package for the package format and automatic installation behaviour.
An identity contains identifying fields such as the ECU name, version, model build ID or A2L identifiers. The available fields depend on the ECU and definition format. An .ECUDEF archive retains the identity of the GIN or A2L definition it contains; packaging a definition does not make it compatible with a different firmware version.
Identity strings are case-sensitive. For example, 01x22 and 01X22 are
different version labels. Spelling, punctuation and whitespace also matter,
except for leading and trailing spaces in a GEMS ECU name.
GIN and Simulink definitions
For a standard GEMS GIN identity, the ECU name and version must match. Leading and trailing spaces in the ECU name are ignored, but version strings are compared exactly.
Simulink identities can also contain a ModelBuildID. Unless either identity
is marked as a legacy identity, different build IDs, or a build ID present on
only one side, prevent a match. After this check, either a matching ECU name
and version or a matching, non-empty model build ID identifies the definition.
Legacy identities skip the strict build-ID check for compatibility with older
firmware.
A base ECU definition therefore does not automatically match a model-specific definition. Where a connection explicitly offers to use a base definition, the extended model signals and data will not be available.
A2L and XCP definitions
A2L/XCP systems do not all use the same identification scheme. GWv4 uses the identifiers available from the ECU, firmware package and definition. Important A2L fields are:
| Identity field | Source in the A2L file |
|---|---|
ProjectName, ProjectLongID |
PROJECT name and long identifier |
ProjectVersion |
HEADER / VERSION |
ModuleName, ModuleLongID |
First MODULE name and long identifier |
ModuleVersion |
First module’s MOD_PAR / VERSION |
EPK |
First module’s MOD_PAR / EPK identifier |
ECU |
First module’s MOD_PAR / ECU identifier |
FileName |
A2L file name without its extension |
FileSha1 |
Hash of the A2L file contents |
For normal automatic matching, the following rules apply in order:
- A matching, non-empty
FileSha1identifies the same definition file. - Otherwise, if both identities contain an
EPK, the EPK strings must match. A different EPK rejects the definition even if its name looks correct. - XCP IP discovery identities use the reported station ID. When both sides
provide extended discovery identities, all supplied discovery fields
(
XcpStationID,EPK,FileName,Path,URL,ECUandPOD) must match, including fields supplied on only one side. - For an XCP connection, the reported file name, station ID or ECU identifier can identify the A2L’s EPK. The station ID can also identify the A2L’s project name, or the two EPK values can match directly.
- Otherwise, project name, project version, project long identifier, module name, module version, module long identifier and EPK are compared. Any of these fields supplied on both sides must agree, and at least one non-empty field must match. If none matches, a matching non-empty file name can be used, provided no conflicting shared field was found.
Missing fields are not generally treated as conflicting values, but two empty fields do not establish a match. A GIN identity is not interchangeable with an A2L identity.
The identity displayed in a prompt may include file locations and other metadata as well as the matching fields. The complete identity blocks do not have to be identical. Also, two identities can have the same displayed name while differing in an EPK or version field.
Resolving a firmware/definition mismatch
Successfully installing a definition means that it has been added to the installed definitions; it does not mean that it matches the firmware you selected. If no compatible definition is installed, the firmware wizard continues to ask for one.
If a mismatch warning appears:
- Compare the Required identity and Installed definition identity shown in the warning. Check the identifying fields, not just the displayed ECU name.
- Check version labels carefully, including upper/lower case. For example,
an EPK containing
EUI_ETC-01x22does not matchEUI_ETC-01X22. - Obtain the matching firmware and ECU definition as a pair from the ECU
supplier. Firmware package authors should ensure that the FINX
identity.jsonagrees with the identifiers in the released A2L file. Renaming the file does not change its embedded EPK or project/module version and cannot correct conflicting embedded identifiers. - Install the matching definition and retry the operation.
Warning
Do not select Program ECU anyway or Force load merely to dismiss an identity mismatch. These overrides do not establish binary compatibility. Using an incompatible definition can prevent a connection or cause incorrect interpretation or modification of ECU data. Resolve the mismatch with the ECU supplier before proceeding.
See Programing/Upgrading ECU Firmware for the firmware programming procedure.