Command line execution

This section describes the Command Line Interface (CLI) commands supported by the S32 Configuration Tools application.

tools.exe -noSplash -application com.nxp.swtools.framework.application [tools commands].

To have the build output written to stdout/stderr and therefore see the progress in the console while the command is executed, use -consoleLog and -noExit options like:

tools.exe -noSplash \
     -consoleLog -noExit \  
     -application com.nxp.swtools.framework.application [tools commands]

OR

the recommended way, use eclipse console executable directly like:

eclipsec.exe -noSplash \
        --launcher.ini /path/to/S32CT/installation/tools.ini
        -application com.nxp.swtools.framework.application [tools commands]

On Linux host, replace tools.exe or eclipsec.exe from above commands with tools:

tools -noSplash -application com.nxp.swtools.framework.application [tools commands]

Notes regarding command-line execution:

  • [tools commands] are all options that follow -HeadlessTool and are described in the next tables.
  • Command -HeadlessTool is used as a separator of each command chain.

  • Each command chain works independently.

  • Every chain starts with -HeadlessTool command and continues to the next -HeadlessTool command, or end. (only exception are commands from framework which does not need the -HeadlessTool command).

  • Commands which don´t need the -HeadlessTool command, can be placed before the first -HeadlessTool if chained, or without -HeadlessTool when not chained.

  • Commands from each tool are executed in given order.

  • Commands from framework are not executed in given order.

  • The following commands are not executed in given order:

    • ImportProject
    • Export MEX
    • ExportAll
  • The application can exit with following codes when unexpected behavior occurs:
    • When parameter is missing: 1
    • When tool error occurs: 2

Command example:

-HeadlessTool Clocks -MCU S32S247TV -SDKVersions32sdk_s32s_rtm_100 -ExportSrc C:/exports/src -HeadlessTool Pins -MCU S32S247TV -SDKVersion s32sdk_s32s_rtm_100 -ExportSrc C:/exports/src -HeadlessTool Peripherals -MCU S32S247TV -SDKVersion s32sdk_s32s_rtm_100 -ExportSrc C:/exports/src

This will create a configuration for S32S247TV processor and s32sdk_s32s_rtm_100 SDK version, will generated code for each specified tool, and the files will be saved at the provided location.

Processor and SDK names can be easily found by going to /path/to/S32CT/installation/mcu_data location:
  • For processor name, find inside processors folder all available processor names
  • For SDK version, find inside /path/to/S32CT/installation/mcu_data/processors/<processor_name> all available versions for that specific processor name
If the given names do not exist in the current installation, the tool will generate no files as data associated with them is not found.

The following commands are supported in the framework:

Table 1. Commands supported in the framework
​​Command name Definition and parameters Description Restriction ​​Example
​Force language ​​-nl {lang}

​Forces set language

{lang} is in ISO-639-1​ standard

​Removal of the '.nxp' folder from home directory is recommended, as some text might be cached

Only 'zh' and 'en' are supported
-nl zh
​​Show console ​​-consoleLog ​Logs output is also sent to Java’s System.out (typically back to the command shell if any) None
​​Select MCU ​​-MCU ​MCU to be selected by framework​

Changes the processor in the result configuration of the previous chain

​Requires –SDKversion command -MCU ​S32S247TV
​Select SDK version ​-SDKversion ​Version of the MCU to be selected by framework ​Requires ​​-MCU command ​-SDKversion amp_sdk1_0
​Select part number ​-​PartNum ​​Selects specific package of the MCU ​Requires -MCU and -SDKversion commands ​-PartNum S32S247TV
​​​Configuration name ​​​-ConfigName ​Name of newly created configuration - used in export ​​Name is used when new configuration is created by -MCU and -SDKversion commands ​​-ConfigName "MyConfig"
​​Select tool ​-HeadlessTool ​Selects a tool that should be run in headless mode ​None ​-HeadlessTool Clocks
​Load configuration ​-Load ​​Loads existing configuration from (*.mex) file ​None ​​-Load C:/conf/conf.mex
​​Export Mex​ ​-ExportMEX​ ​Exports .mex configuration file after tools run

Argument is expected as a folder name​

​None ​​-MCU xxx -SDKversion xxx​ ​​-ExportMEX C:/exports/my_config_folder
​​Export all generated files ​-ExportAll ​​Exports generated files (with source code and so on. Code is regenerated before export

Includes -ExportSrc and in framework -ExportMEX​

Argument is expected as a folder name​

​​Requires -HeadlessTool command ​​-HeadlessTool Pins ​-ExportAll C:/exports/generated​

Create a new configuration by importing toolchain project

​-ImportProject {path}

Creates new configuration by importing toolchain project based on the found .mex or yaml info. It updates code and validates configuration.

Parameter is path to the root of the toolchain project

For IDE, requires -sdkPath {path_to_sdk_manifest_dir}

-HeadlessTool Peripherals -importProject c:\test\myproject

Imports toolchain project and updates code.

-HeadlessTool Peripherals -importProject c:\test\myproject -sdkPath c:\test\sdk_dir

When executed from IDE, it imports toolchain project and updates code looking also into the sdk_manifest.xml file(s) if it contributes to the code generation and brings all defined components dependencies.

​​Specify SDK path

​​​-SDKpath {path}

​​Specify absolute path to the root directory of the SDK package.

​​@since v3.0

-SDKpath ​​c:\nxp\SDK_2.0_MKL43Z256xxx4C:\NXP\S32DS.2019\S32DS\S32SDK_S32V23x_EAR_0.8.1

Generate source files with custom copyright ​-CustomCopyright File content is inserted as a copyright file header comment into generated source files (.c, .h, .dts, .dtsi), that doesn't conatin copyright Requires -HeadlessTool command -CustomCopyright c:\test\copyright.txt
Override the output path of the generated files -OutputPathOverrides ​Path to the file with rules, that will be used to override output paths of the generated file.Empty list of rules removes the setted rules. -OutputPathOverrides c:\test\outputPathOverrideRules.yaml

Import ECU Configuration files

-ImportEcuConf

Import ECU Configuration file(s) (*.arxml, *.*) into configuration.

Importing is done after loading mex or creating a new configuration and before generating outputs.

Requires -HeadlessTool Peripherals

-ImportEcuConf c:\test\myproject\ecuConfFile.arxml -HeadlessTool Peripherals

Disable the version checking

-DisableEcuVersionCheck

Constant used to skip the ECUC module version checking when it is imported.

Requires -ImportEcuConf

-ImportEcuConf c:\test\myproject\ecuConfFile.arxml -DisableEcuVersionCheck

Export given arguments via scriptApi -ExportArgs {list with arguments} Export given arguments to javascript via scriptApi. The exported arguments can be retrieved in javascript by calling: scriptApi.getUtils().getExportedArgs()

Internal usage.

Requires -HeadlessTool command -HeadlessTool Peripherals -ExportArgs epc epd
Export given component ids via scriptApi -ExportComponentIds {list with component ids} Export given component ids to javascript via scriptApi. The exported component ids can be retrieved in javascript by calling: scriptApi.getUtils().getExportedComponentIds() This should be used in combination with -ExportArgs flag to export certain files for the given list of component ids.

Internal usage.

Requires -HeadlessTool command -HeadlessTool Peripheral -ExportArgs epc epd -ExportComponentIds eth_43_gmac adc_16

Examples:

  • Create a new configuration, import an ECU Configuration file and export all files for Peripherals Tool:
    eclipsec.exe -noSplash \
            -application com.nxp.swtools.framework.application \
            --launcher.ini /path/to/S32CT/installation/tools.ini \
            -MCU /processor/name \
            -SDKVersion /sdk/version/name \
            -ImportEcuConf /path/to/ECU/Configuration \
            -HeadlessTool Peripherals \
            -ExportAll /path/where/to/save/files
  • Import configuration from existing .mex file, after that import an ECU Configuration file, choose to disable the ECU version checking when it is imported, and export all the files for Peripherals Tool:
    eclipsec.exe -noSplash \
            -application com.nxp.swtools.framework.application \
            --launcher.ini /path/to/S32CT/installation/tools.ini \
            -Load /path/to/mex/file
            -ImportEcuConf /path/to/ECU/Configuration \
            -DisableEcuVersionCheck \
            -HeadlessTool Peripherals \
            -ExportAll /path/where/to/save/files