Generate ECU Extract

Once the required components are in place and the tool is successfully installed, you’re ready to generate the ECU extract. For deriving an ECU Configuration (Derive ECU-C), you need an ECU Extract. The purpose of this section is to guide you through the generation of an ECU Extract using EcuXPro. The EcuXPro allows you to generate this ECU Extract out of one or multiple input files which might be of different types.

Follow the steps below to ensure a smooth and accurate generation process.

Analyze Input Files

Before starting the generation process, it’s crucial to analyze the input files you have. The EcuXPro provides the analyze command to help you with this task. This command inspects the provided input files and generates a detailed report about how to proceed further. The result of this analysis can either be saved in a shell script file (for windows command line or linux shell bash) or can be printed directly to the console. This way, the result consists of a set of commands that you can use to generate the ECU Extract.

How to use the Analyze Command

To generate an invariant ECU extract follow the steps below to create the extract correctly.

  1. Navigate into installation path of the DaVinci Configurator Classic into the folder EcuXPro. By adding all files and the output folder which shall contain the generated ECU Extract to be generated later, you will be provided as a result of this command a suggestion of commands. If legacy files are input as well, then you need to install the Legacy Converter tool, or you will have to provide its path using the option -c. Depending on the shell type you want, you must specify the output format you want, using the option --output-format. Currently, you can choose between shell_cmd (for Windows Command Line) and shell_bash (for Linux Shell Bash). Setting a value for the option save-script will save the generated commands into a script file instead of printing them to the console." Below is an example command structure:

    Analyze Command
    ecuxpro analyze -f <file1>,<file2...> -o="/Path/To/Generated/Ecu/Extract" -c="/Path/To/Legacy/Converter" --output-format=shell_cmd --save-script="/Path/To/Save/ScriptFile.bat"
    1. The result of this command will be a script file containing a set of ready-to-run commands that you can use to generate your ECU extract. Before running the script, you might need to set some variables in the script file, especially the ECU Instance Names.

    2. If you haven’t provided the option --save-script, then you have to copy suggested ready-to-run commands in the console output to generate an ECU Extract out of your input files.

      This may look like this:

      Ready-to-use Commands
      ecuxpro merge -i="D:\DEV\Workspaces\VectorDemo\Input\OEMInput\Preprocessing\EthernetCluster.arxml" -i="D:\DEV\Workspaces\VectorDemo\Input\OEMInput\Preprocessing\DiagnosticData.arxml" -i="D:\DEV\Workspaces\VectorDemo\Input\OEMInput\Preprocessing\MyECU_LdCom_PW_Transformer.arxml" D:\DEV\Workspaces\MyProject\InvariantMerged.arxml

      In this case, paste the ready-to-use commands from the console into your terminal or build task script and execute it to generate your ECU extract.

  2. In both cases, the result is a generated ECU Extract which is now available in the specified output folder.

Analyzing Input Files for Variant ECU Extract

  1. For the special use case of a variant ECU project (several Input File Sets), you need to provide additional information to correctly specify your variants, as the analyze command expects also the option -e to be set to specify an Evaluated Variant Set (EVS) file. This EVS contains among other information the Post-Build Variant names. See Create Evaluated Variant Set for more information about creating an EVS.

  2. Retrieve the information from your EVS file. If you have an EVS and don’t know all the Post-Build Selectable variants contained within it, you can use the following command to query Post-Build variant names within your EVS.

    ecuxpro evs-info -e="/Path/To/EVS.arxml"

    The console will display the possible variants in your EVS file, for example: FrontLeft and FrontRight.

  3. Run the analyze command to get suggestions for ready-to-run commands. Add your variant names along with the input files you want to include in each variant. Please note that here the additional option -e is used to specify the EVS file.

    ecuxpro analyze -f FrontLeft=<file1> -f FrontRight=<file2>,<file3> -o="/Path/To/Generated/Ecu/Extract" -c="/Path/To/Legacy/Converter" -e="/Path/To/EVS.arxml" --output-format=shell_cmd --save-script="/Path/To/Save/ScriptFile.bat"

    In this example, the variant FrontLeft is assigned to <file1>, and FrontRight is assigned to <file2> and <file3>.

  4. Executing the command will generate a script file containing ready-to-run commands for generating your variant ECU Extract. The execution of the script file will create the variant ECU Extract in the specified output folder. Please make sure that you set all variables in the script file before executing it.

The EcuXPro supports various input file formats. The table below gives an overview of the supported formats.

Allowed Input File Formats

Table 1. Allowed Input Files Formats in EcuXPro
Format Name

arxml

AUTOSAR XML Format

dbc

Database CAN

ldf

LIN Description File

fibex

Field Bus Exchange Format

vsde

Vector System Description Extension

  • Please note that Legacy Diagnostic data formats (.odx, .pdx, .cdd, .data, .csv) cannot be processed by the EcuXPro but require the use of the DDM (see How to Create a DDM ECU Configuration) instead.

  • The Legacy Communication data formats (.ldf, .dbc, .fibex, .vsde) can be processed by the EcuXPro only when the Legacy Converter is installed or its path is provided during the analysis. For more information about the Legacy Converter. You will find the Technical Reference for the Legacy Converter tool within its installation directory, under Documentation.

Run Individual Features

If you already know what you need, you can call the commands directly. Common features include:

  • extract-sysd: Extract all elements related to a single ECU out of the System Description given by the input file and save the result in the specified output file. For this command, you need to provide the ECU Instance Name using the option -e.

    Example Command
    ecuxpro extract-sysd -i <file1> -e=Ecu /Path/To/Generated/Ecu/ExtractedEcu.arxml
  • merge: Merge the given input files into one ECU Extract which is saved into the specified output file. The order of the input files is relevant, as the elements of the first one are considered the base elements, and the elements of the following input files are merged into these base elements. So changing the order of input files might change the result of the merge.

    Example Command
    ecuxpro merge -i <file1> -i <file2> -i <file3> /Path/To/Generated/Ecu/MergedEcu.arxml
  • run-script: Execute the given script file(s) on the given input file and save the result in the specified output file. With the option -l, you can specify either a script file or a directory containing one or more script files. Only scripts with the task type DV_ON_ECU_EXTRACT_PRODUCER are considered. You might define multiple tasks and arguments in one script file and pass them as option to this command.

    Example Command
    ecuxpro run-script -i <file1> -l /Path/To/ScriptLocation -t taskName -a "taskName" -a "-nameArgument argumentValue" /Path/To/Modified/File.arxml
  • variant-merge: Merge the given input files into one variant ECU Extract which is saved into the specified output file. The option -f allows you to specify as many file sets as there are Post-Build variants in the project. You can define more than one file for each variant (file set) by separating the input files paths with a comma. The option -e allows you to specify the EVS file which contains the Post-Build variant names and you can define the Merge Configuration file using the option -m.

    Example Command
    ecuxpro variant-merge -f <variant-name1>=<file1> -f <variant-name2>=<file2> -e /Path/To/EVS.arxml -m /Path/To/Merger/Config/File.xml /Path/To/Variant/Ecu/Extract/File.arxml

Next Steps

You have successfully generated an ECU Extract. To continue, proceed with the next step:

This will allow you to derive the corresponding ECU Configuration and integrate it into your project.