Command Line Arguments
Command Line:
ginmake [options] [targets … n]
targets
Defines the list of input files (*.h file(s) and/or *.grh file(s))
options
| 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. |
Examples
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.
Source code update mode
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.