OpenECU provides a number of configuration options which affect the build process. The
options can be accessed by opening an OpenECU model and selecting the menu option
Simulation-> Configuration Parameters...
(or
Simulation-> Model Configuration Parameters
in later versions of Simulink)
then browsing to the OpenECU options under Real-Time Workshop
(or Code Generation
in later versions of Simulink).
Under the Real-Time Workshop
(or Code Generation
in later
versions of Simulink) categories, there are both built-in Simulink options, and OpenECU
additional options.
The built-in Simulink options that OpenECU recognizes are:
Interface
The OpenECU build process will recognize the "ASAP2" setting for this parameter. This option will set the parameter 'GenerateASAP2' to 'on', and during the build process, an ASAP2 file will be generated using Simulink's built-in ASAP2 generation process in place of the OpenECU ASAP2 generation process.
The OpenECU additional options are grouped into the following categories:
OpenECU code generation options
This group of options affects the model generated code before it is built.
Ensure this option is selected if the model has a pan_EngineConfig block configured to iterate part of the model synchronous to the engine crank input (i.e., not using a TDC-firing function-call trigger).
This option is deprecated and should not be used in preference to the TDC-firing function-call trigger outport from the pan_EngineConfig block. This option is retained for backwards compatibility and will be removed in a future version of the blockset.
Specify the maximum data dictionary entry name length,the range should be between 31 and 255 characters. If a data dictionary identifiers exceeds the maximum length then a warning will be generated and the name will be shortened during the ASAP2 generation. If length is given a value of 0, then there will be no limit on identifier length.
When this option is selected and a build starts, OpenECU reads the build list and data dictionaries. This brings the latest information from the data dictionaries into the workspace and overwrites any changes to existing entries in the workspace.
Specifies the amount of RAM dedicated to stack usage. Stack is used by
the auto-generated code and platform to maintain a working store of
calculations. The default size of the stack is 5KB which should be large
enough for most models. The size can be changed by altering the default,
for instance, by reducing the value based on the automatic
ASAP2 variable mpl_max_used_stack
to provide more
RAM for model functionality.
OpenECU image generation options
This group of options affects what images are generated at the end of a build. An image is downloaded or flashed onto the ECU to run on target.
If selected, the OpenECU build process will generate a Motorola S-record file which represents the image to download. If not selected, the file is not produced (or deleted if it previously existed).
If the S-record file is produced, it is named model_name_image_small.s37
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will generate an Intel HEX files which represent the image to download. If not selected, the file is not produced (or deleted if it previously existed).
If the HEX file is produced, it is named model_name_image_small.hex
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will attempt to generate an ATI Vision strategy file. The build process does this by invoking the ATI Vision tool, so the tool must be installed on the machine which builds the model. This feature is supported if the ATI Vision software is version 2.0 or above.
If not selected, the Vision strategy file is not produced (or is deleted if it previously existed).
If a strategy file is produced, it is named model_name.vst
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will ignore any failures to generate an ATI Vision strategy file. This can occur, if the wrong version of ATI Vision is used to generate the strategy file.
If not selected, the OpenECU build process will stop when there is a failure to generate an ATI Vision strategy file.
OpenECU ASAP2 generation options
This group of options affects the ASAP2 generated file (and the ATI Vision Strategy file if selected).
This option provides a number of naming schemes that can transform the DD entry names in any generated ASAP2 file.
Data dictionary names take the form prefix_name
(as detailed in Section 8.2.5, “Naming rules”) and are used for
each ASAP2 entry. Some calibration tools can group names together
based on the prefix (for instance, ATI Vision's
Structure naming: Names as groups import
feature). This feature converts the data dictionary names before
inserting them into the ASAP2 file to match tool features.
Table 4.6. ASAP2 naming schemes
Scheme | Description |
---|---|
prefix_name | Keep data dictionary names unchanged, e.g., mbe_engine_rpm
remains as mbe_engine_rpm |
prefix.name | Change mbe_engine_rpm
to mbe.engine_rpm |
prefix.name_prefix | Change mbe_engine_rpm
to mbe.engine_rpm_mbe |
name | Change mbe_engine_rpm
to engine_rpm |
name_prefix | Change mbe_engine_rpm
to engine_rpm_mbe |
If selected, the OpenECU build will generate a set of ASAP2 entries
with the prefix mpl
. These entries provide information
about the build time and run time as detailed in Section 5.2, “Automatic ASAP2 entries”.
If not selected, these automatic variables are not generated.
If selected, the OpenECU build process will generate a generic ASAP2 file that should be readable by any calibration tool. The ASAP2 file contains only information about DD entries. The user will need to tell the tool about memory regions and CCP settings.
If not selected, the generic file is not produced (or deleted if it previously existed).
If a generic ASAP2 file is produced, it is named model_name_tool_generic.a2l
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will generate an ASAP2 file tailored specifically for the ATI Vision calibration tool. If not selected, the Vision file is not produced (or deleted if it previously existed).
If a ATI Vision ASAP2 file is produced, it is named model_name_tool_vision.a2l
where model_name
is replaced by the name of the model.
If the Generate ATI Vision Strategy file option is selected, this option need not be selected.
If selected, the OpenECU build process will generate an ASAP2 file tailored specifically for the ETAS INCA calibration tool. If not selected, the ETAS INCA file is not produced (or deleted if it previously existed).
If a ETAS INCA ASAP2 file is produced, it is named model_name_tool_inca.a2l
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will generate an ASAP2 file tailored specifically for the Vector CANape calibration tool. If not selected, the Vector CANape file is not produced (or deleted if it previously existed).
If a Vector CANape ASAP2 file is produced, it is named model_name_tool_canape.a2l
where model_name
is replaced by the name of the model.
If selected, the OpenECU build process will add DDEs to the generated
ASAP2 file, to enabled calibration of J1939 and J1979 IDs. The generated
DDEs will be named <DTC name>_<parameter>
.
If not selected, DDEs will not be added to the generated file.
If selected, the OpenECU build process will generate an ASAP2 file using the array and map sizes found in the workspace, not the build list DDE files.
For instance, if a DDE is declared as having 4 elements but the workspace is modified to have 5 elements after the build list has been read, then if this option is selected, a build will generate an ASAP2 file which specifies 5 elements for that DDE. If this option is not selected, a build will generate an ASAP2 file which specifies 4 elements for that DDE.
This feature requires that the RTW option Re-read build list before building is not selected. If it is selected, then at the start of a build, OpenECU will re-read the build list DDE files, overwriting any changes made to the equivalent workspace variables.
If selected, the OpenECU build process will generate old-style ASAP2 map names.
Old style ASAP2 map names contain _z
at the end of the map name.
This usage was used in releases older than version 1.9.0 and this option was introduced
to allow for backwards compatibility of calibration files.
OpenECU compiler selection
This group of options selects between the available supported compiler versions for OpenECU models.
Which compiler to use to build an OpenECU model. The compiler and linker options can be adjusted using the pcomp_CompileOptions and pcomp_LinkOptions blocks.
OpenECU target settings
This group of options is used for model reference only in Embedded Coder. It is ignored in all other auto-coders.
Clicking this button will propogate the target settings from the current model
to all of the model reference blocks used within this model. If the
model is not in memory, it will be loaded and then saved.
Clicking this button has the same effect as calling
oe_propogate_target_settings(bdroot)
from MATLAB's command window.
Specifies the ECU that the model will run on (e.g. M250, M460, etc.). This field is used only for model reference targets. For all other models use the put_Identification block in your model. The put_Identification block will automatically make changes to this field when present in the model.
Specifies the part number that appears on the ECU casing, followed by a hyphen and three character suffix. The suffix denotes the option. The part number must match the ECU type field (e.g. M250 option 000 = 01T-068276-000). This field is used only for model reference targets. For all other models use the put_Identification block in your model. The put_Identification block will automatically make changes to this field when present in the model.
Specifies the issue or revision number of the ECU. This is the first number that appears after the hardware part number on the label of the ECU. This field is used only for model reference targets. For all other models use the put_Identification block in your model. The put_Identification block will automatically make changes to this field when present in the model.
OpenECU data dictionary
This group of options affects the data dictionary used for building and simulating a model.
If selected, oe.Parameter
and oe.Signal
objects are used when reading a text based data dictionary file
with any auto-coder selected. If using a Simulink based data dictionary, this option
is ignored, and oe data objects will always be used.
If selected the naming convention rules can be disabled, only if the model is configured to use a Simulink data dictionary and the 'Use oe data objects' option is selected. This option is disabled if 'Use oe data objects' is not selected, and cannot be used to disable the naming convention when using text based data dictionaries.
OpenECU checksum configuration
This group of options affects the checksums that are applied to the application and calibration data.
Specifies checksum type. This checksum is calculated at build time and stored as part of the binary image. It is compared with another checksum that is calculated on the ECU during startup. If the checksums do not match, then the application is not permitted to run. The CRC checksum is more likely to detect errors than the IPv4 style checksum, but it takes significantly longer for the ECU to calculate during initialization.
Specifies regions to checksum. If this is set to include the calibration, then care must be taken when using calibration tools. The tools will be able to modify calibrations, but once the modifications are flashed the checksum will be invalidated and the application will not be permitted to run.