Contents

Using Command Option Abbreviations

The DaVinci Developer Adaptive CLI supports abbreviations for double-dash command options.

If the CLI finds exactly one match, then the command is executed. If the CLI finds multiple matches, execution of the CLI is cancelled.

Abbreviations are case-sensitive. The full command is case-insensitive.

Example

--listArxmlFiles / --listarxmlfiles can be abbreviated to --listArxF or --lAF.

DaVinci Developer Adaptive Code Generation

Execute the code generation for a given DaVinci Developer Adaptive project.

notice

Note: At least one of the options -g, -v, --fullValidation, --listScopes, --listGenerators or --listArxmlFiles must be specified.

Usage examples

Linux

./DVACfgCmd -p "./project.adpa" -g --genDataDir "./project/src-gen"
./DVACfgCmd --project "/project/arxml" --generate --genDataDir "/project/src-gen"

Windows

.\DVACfgCmd.exe -p ".\project.adpa" -g --genDataDir ".\project\src-gen"
.\DVACfgCmd.exe --project "\project\arxml" --generate --genDataDir "\project\src-gen"

Command Reference

Option

Arguments

Mandat

Description

-p, --project

<FILE_OR_DIR>

yes

Specifies the path to a project file(*.adpa).

Without specifying --referencedProjectPath, the referenced projects are searched according to the last known path, which is stored in the project file(*.adpa).

It is also possible to specify a path to directory with AUTOSAR files(*.arxml), which will be loaded recursively.

For this use case the option can be specified multiple times to load AUTOSAR files from several locations.

Example:
-p "/project1/arxml" -p "/project2/arxml"

Note: It's not possible to specify a directory with AUTOSAR files and use the option --referencedProjectPath. In this case the directories with AUTOSAR files of all projects must be specified.

-g, --generate

 

no

Validate and generate the given project specified in -p option.

Unless otherwise stated all available scopes in the current model will be used. Use --scope to change scopes.

Unless otherwise stated all available generators will be used. Use -m or -x to select/deselect generators.

-v, --validate

 

no

Validate the given project specified in -p option.

Unless otherwise stated all available scopes in the current model will be used. Use --scope to change scopes.

Unless otherwise stated all available generators will be used. Use -m or -x to select/deselect generators.

This option cannot be specified with -g nor --fullValidation options.

--fullValidation

 

no

Validate the whole model in the given project specified in -p option with all available generators.

This option cannot be specified with -g nor -v options.

This option will ignore --scope, -m and -x options. All available scopes and generators will be used to validate.

--listScopes

 

no

Prints out available scopes in the current model and stops the execution of validation and generation.

--listGenerators

 

no

Prints out available generators in the current BSW Package and stops the execution of validation and generation.

--listArxmlFiles

 

no

Prints out loaded arxml files that are loaded from (i) existing projects and (ii) current BSW package.

--sipRootPath

<DIR_PATH>

no

Deprecated. Use --bswPackageRootPath instead.

--bswPackageRootPath

<DIR_PATH>

no

Specifies the path of BSW Package root directory.

Use this option if DVACfgCmd executable is not installed in "<BSW_PACKAGE_ROOT>/CLI/Core".

--scope

<SCOPE_DEF>

no

Specifies the model scope that will be used in validation or generation. Use --listScopes to see available scopes.

If this option is omitted all available scopes in the current model will be selected.

A scope is specified by a AUTOSAR path to a root object in the current model.

Syntax:
--scope "<AUTOSAR path>"

This option can be used multiple times, to specify multiple scopes to validate or generate.

Example:

--scope "/vector/component_test_executable"

--scope "/vector/component_test_machine"

-m, --modulesToGenerate

<GENERATORS>

no

Specifies the generators, which will be used in validation or generation. Use --listGenerators to see available generators.

If empty (""), then no generators will be used.

Separate multiple generators by a ','.

Syntax:
--modulesToGenerate "<identifier1>,<identifier2>,..."

The identifier of a generator is the AUTOSAR path.

Example:
--modulesToGenerate "/ADAPTIVE/MICROSAR/amsr_modelleddatatypes_api,/ADAPTIVE/MICROSAR/amsr_applicationbase"

You could also pass the shortname of the generator, like "amsr_modelleddatatypes_api". But be aware all generators that have the same shortname will be used!

With the value 'default', all generators specified in the project file(*.adpa) will be used. This requires the path to a project file is provided in -p option.

Example:
-p "/project/.adpa/project.adpa" --modulesToGenerate "default,/ADAPTIVE/MICROSAR/amsr_modelleddatatypes_api"

It means that all generators specified in the project file and also /ADAPTIVE/MICROSAR/amsr_modelleddatatypes_api will be used in validation or generation.

-x, --modulesToExclude

<GENERATORS>

no

Specifies the generators, which will not be used in validation or generation. Use --listGenerators to see available generators.

All available generators will be used except those you specified in this option.

Note: This option cannot be specified with --modulesToGenerate option.

Separate multiple generators by a ','.

Syntax:
--modulesToExclude "<identifier1>,<identifier2>,..."

The identifier of a generator is the AUTOSAR path.

Example:
--modulesToExclude "/ADAPTIVE/MICROSAR/amsr_modelleddatatypes_api,/ADAPTIVE/MICROSAR/amsr_applicationbase"

You could also pass the shortname of the generator, like "amsr_modelleddatatypes_api". But be aware all generators that have the same shortname will be excluded!

--referencedProjectPath

<FILE_OR_DIR>

no

Specifies the search path, where a referenced project (specified in the project file) is located. The path could be a project file(*.adpa), a .adpa directory, a root-directory of a project or the parent directory of a root-directory of a project.

Syntax:
--referencedProjectPath "<FILE_OR_DIR>"

Example:

--referencedProjectPath "/workspace/project/.adpa/project.adpa"

--referencedProjectPath "/workspace/project/.adpa"

--referencedProjectPath "/workspace/project"

--referencedProjectPath "/workspace"

This option can be used multiple times, to specify multiple referenced projects.

Example:
--referencedProjectPath "/workspace/project1" --referencedProjectPath "/workspace/project2"

--genDataDir

<GEN_DATA_DIR>

no

Specifies the output directory for the generated data files.

Syntax:
--genDataDir "<GEN_DATA_DIR>"

Example:
--genDataDir "/project/src-gen"

If -g option is given and -p option is a project file(*.adpa), this option becomes mandatory if <GenData> does not exist in the project file.

If -g option is given and -p option are directories with AUTOSAR files(*.arxml), this option is mandatory.

--ignoredWarningIds

<VALIDATION_RESULT_IDS>

no

Specifies the Ids of validation results to be ignored. If the corresponding results have warning severity type, then it will be ignored and not printed out in the log.

Separate multiple Ids by a ','.

Syntax:
--ignoredWarningIds "<VALIDATION_RESULT_ID1>,<VALIDATION_RESULT_ID2>,..."

Example:
--ignoredWarningIds "AR-APBASE00003,Ats00024"

--includeAutosarWarnings

 

no

Enables the displaying of the non-generator AUTOSAR warnings.

AUTOSAR warnings not reported during generation are suppressed by default unless this option is specified.

This option shall be specified with -g or -v options. This option cannot be specified with --fullValidation option.

--genArg

<GEN_ARGS>

no

Passes arguments to the specified code generators.

Syntax:
--genArg "<generator name>:<argument>=<value>"

Multiple arguments for one generator can be passed in one --genArg argument or in several.

If several --genArgs are used for the same generator, the values are concatenated with a space as separator.

Examples:

--genArg "amsr_modelleddatatypes_api:Arg1=true Arg2=false"

--genArg "amsr_modelleddatatypes_api:Arg1=true" --genArg "amsr_modelleddatatypes_api:Arg2=false"

This option can be used multiple times, to pass arguments to multiple generators.

Examples:
--genArg "amsr_modelleddatatypes_api:Arg1=true"

--genArg "amsr_applicationbase:Arg2=false"

--genArgUniversal

<GEN_ARGS>

no

Passes arguments to all code generators.

Syntax:
--genArgUniversal "<argument>=<value>"

Multiple arguments can be passed in one --genArgUniversal argument or in several and this option can be used multiple times.

If several --genArgUniversal are used the values are concatenated with a space as separator.

Example:

--genArgUniversal "Arg1=true Arg2=false"

--genArgUniversal "Arg1=true" --genArgUniversal "Arg2=false"

--reportFile

<REPORT_FILE>

no

Specifies the path to the Generation Execution Report file to export the execution results to a XML file.

Syntax:
--reportFile "<REPORT_FILE>"

Example:
--reportFile "/project/GenerationExecutionReport.xml"

--reportArgs

<REPORT_ARGS>

no

Specifies special arguments for the Generation Execution Report.

Available arguments:

  • CreateXmlFile
  • CreateHtmlReport
  • CreateJsonReport

If no reportArgs are specified, it will use the default settings. (Default: Create both XML and HTML files)

Example:
--reportArgs "CreateHtmlReport"

It means only HTML file will be created for Generation Execution Report.

--saveProject

 

no

Saves the project after validation or generation. Generators may modify the project in the calculation phase before the actual generation has started.

This option will persist those modifications.

--keepGenTempFiles

 

no

Keeps the temporary files created during generation after the generation process is finished.

--noDvMexMigration

 

no

Disables the execution of automatic MEX migration.

--enableAutosarXsdSchemaValidation

 

no

Enables the AUTOSAR XSD schema validation during project loading.

DaVinci Developer Adaptive Automation Script Execution

The DaVinci Developer Adaptive command line application executes user defined scripts.

notice

Note: At least one of the options --scriptTask, --scriptTaskHelp or --listAvailableScriptTasks must be specified.

Usage examples

Linux

./DVACfgCmd --scriptTask "ApplTask"
./DVACfgCmd --scriptTask "ProcessProject" --project "./project.adpa"
./DVACfgCmd --scriptTask "UpdateProjectTask" --taskArgs "--updateInputFolder "/home/InputDataFolder" --diagOnly"

Windows

.\DVACfgCmd.exe --scriptTask "ApplTask"
.\DVACfgCmd.exe --scriptTask "ProcessProject" --project ".\project.adpa"
.\DVACfgCmd.exe --scriptTask "UpdateProjectTask" --taskArgs "--updateInputFolder "\home\InputDataFolder" --diagOnly"

Command Reference

Option

Arguments

Mandat

Description

-s, --scriptTask

<TASK_NAME>

no

Specifies the script task to execute. Use --listAvailableScriptTasks to see available scripts.

Separate multiple tasks to execute by a ','.

Syntax:
--scriptTask "<TaskName1>,<TaskName2>,..."

The <TASK_NAME> could also be full qualified with the script name prefix, to call a task with clashing names.

Example:
--scriptTask "MyScript1:MyTask1,MyScript2:MyTask2"

--scriptTaskHelp

<TASK_NAME>

no

Displays the help of the specified script task. For the <TASK_NAME> format, see --scriptTask.

--listAvailableScriptTasks

 

no

Prints out available script tasks from the BSW Package, loaded project and locations specified in --scriptLocations option.

-p, --project

<FILE_OR_DIR>

no

Specifies the path to a project file(*.adpa).

Without specifying --referencedProjectPath, the referenced projects are searched according to the last known path, which is stored in the project file(*.adpa).

It is also possible to specify a path to directory with AUTOSAR files(*.arxml), which will be loaded recursively.

For this use case the option can be specified multiple times to load AUTOSAR files from several locations.

Example:
-p "/project1/arxml" -p "/project2/arxml"

Note: It's not possible to specify a directory with AUTOSAR files and use the option --referencedProjectPath. In this case the directories with AUTOSAR files of all projects must be specified.

--sipRootPath

<DIR_PATH>

no

Deprecated. Use --bswPackageRootPath instead.

--bswPackageRootPath

<DIR_PATH>

no

Specifies the path of BSW Package root directory.

Use this option if DVACfgCmd executable is not installed in "<BSW_PACKAGE_ROOT>/CLI/Core".

--referencedProjectPath

<FILE_OR_DIR>

no

Specifies the search path, where a referenced project (specified in the project file) is located.

The path could be a project file(*.adpa), a .adpa directory, a root-directory of a project or the parent directory of a root-directory of a project.

Syntax:
--referencedProjectPath "<FILE_OR_DIR>"

Examples:

--referencedProjectPath "/workspace/project/.adpa/project.adpa"

--referencedProjectPath "/workspace/project/.adpa"

--referencedProjectPath "/workspace/project"

--referencedProjectPath "/workspace"

This option can be used multiple times, to specify multiple referenced projects.

Example:
--referencedProjectPath "/workspace/project1" --referencedProjectPath "/workspace/project2"

--scriptLocations

<DIR_PATH>

no

Specifies an additional directory to search for scripts.

Separate multiple directories by a ','

Syntax:
--scriptLocations "<Directory1>,<Directory2>,..."

--taskArgs

<TASK_ARGS>

no

Passes arguments to the specified script tasks.

The arguments have the following syntax:

Syntax:
--taskArgs "<TaskName>" "<Arguments to Task>"

Example:
--taskArgs "MyTask" "-s --projectCfg MyFile.cfg"

If only one task is executed, the "<TaskName>" can be omitted. If multiple tasks are executed you have to specify the task name before the arguments.

The --scriptTaskHelp option will print out the possible arguments to a script task.

For multiple task arguments the following syntax apply:

Syntax:
--taskArgs "<TaskName>" "<Arguments to Task>" "<TaskName2>" "<Arguments to Task2>"

Example:
--taskArgs "MyTask" "-s --projectCfg MyFile.cfg" "Task2" "-d --saveTo saveFile.txt"

If the task name is not unique, you can specify the full qualified name with script name.

Example:
--taskArgs "MyScript:MyTask" "-s --projectCfg MyFile.cfg"

Arguments with spaces inside the script task argument could be quoted with ""<Content>""

Example:
--taskArgs "MyScript:MyTask" "-s --projectCfg ""Path to File\MyFile.cfg"" -d"

--ignoreUserScriptLocations

 

no

Ignores all script locations of the scopes User@Machine and User@Project. It will exclude the scripts in these scopes. This is helpful for batch jobs which shall not interfere with any settings made by the user.

--noDvMexMigration

 

no

Disables the execution of automatic MEX migration.

--enableAutosarXsdSchemaValidation

 

no

Enables the AUTOSAR XSD schema validation during project loading.

Common Parameters

Command Reference

Option

Arguments

Mandat

Description

-h, --help

 

no

Shows this help.

--verbose

<Level>

no

Enables the verbose output of logging messages.

Possible arguments:
ERROR, WARN, INFO, DEBUG

Optional Argument:
The Log-Level for the verbose output.

Default: ERROR

-l, --logfile

<FILE>

no

Set the file to log the Console output into.

--consoleEncoding

<CharsetName>

no

Set the encoding of the console output.

If no argument is passed, a list of all supported charsets is printed.

If no --consoleEncoding is set, the default charset UTF-8 is used. You should set the encoding according to your command line.

If you pass the charset name "consoleDefault", the tool will try to use your currently default charset of your command line console.

Note:
All file outputs are always UTF-8 encoded.

@

<TXT_FILE>

no

Enables reading of additional arguments from text file. Arguments will be inserted in place of the original @file option.

If file does not exist, then the option will be treated literally, and not removed.

The file itself may contain additional @file options. Any such options will be processed recursively.

-vmargs

<JVM_Options>

no

Pass arguments to Java virtual machine.

Example:
Enable debugger for script development or generator development.

-vmargs -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=<PORT_NUMBER>

Troubleshooting

org.osgi.framework.BundleException

If you run DVACfgCmd as multiple instances without having built the configuration cache first, org.osgi.framework.BundleException is thrown.

Solution:

Run only one DVACfgCmd instance. This builds the configuration cache at

  • <DvDevAdaptive>/configuration/org.eclipse.core.runtime and
  • <DvDevAdaptive>/configuration/org.eclipse.osgi

After that you can run DVACfgCmd as multiple instances.