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 a parameter is missing: 1
    • When a tool error occurs: 2

Command example:

-HeadlessTool Clocks -MCU S32S247TV -SDKVersion s32sdk_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
Empty configuration -EmptyConfig Ensures creating a new empty configuration without any content ​Requires the -HeadlessTool command ​-HeadlessTool Pins ​

-EmptyConfig
​​Select MCU ​​-MCU ​MCU to be selected by framework​

Changes the processor in the result configuration of the previous chain

Requires the -HeadlessTool and -SDKversion commands. -MCU S32S247TV

-SDKversion s32sdk_s32s_rtm_100

-HeadlessTool Pins

-Load C:/conf/conf.mex

-SDKversion s32sdk_s32s_rtm_100

-MCU S32S247TV

-ExportMEX C:/conf/S32S247TV.mex
​Select SDK version ​-SDKversion ​Version of the MCU to be selected by framework ​Requires ​the ​-MCU command ​-MCU S32S247TV

-SDKversion s32sdk_s32s_rtm_100
​Select part number ​-​PartNum ​​Selects specific package of the MCU

Changes package in result configuration of previous chain, see the command about "-MCU"

​Requires the -MCU and -SDKversion commands -MCU S32S247TV

-SDKversion s32sdk_s32s_rtm_100

-PartNum S32S247TV
​​​Configuration name ​​​-ConfigName ​Name of newly created configuration - used in export

Rename the configuration

​​Requires the -HeadlessTool command

-ConfigName "MyConfig"

​​Select tool ​-HeadlessTool ​Selects a tool that must be run in headless mode ​If the tool is disabled in the configuration, it will not be enabled by this option. Use -Enable if the tool must be enabled via cmd line. ​-HeadlessTool Clocks
​Load configuration ​-Load ​​Loads the existing configuration from a (*.mex) file ​None ​​-Load C:/conf/conf.mex
​​Export Mex​ ​-ExportMEX​ ​Exports the.mex configuration file after tools run

The argument is expected to be a folder or path to specify the .mex file​

Requires the -HeadlessTool command ​​-MCU xxx -SDKversion xxx​ ​​-ExportMEX C:/exports/my_config_folder

-ExportMEX C:/exports/my_config_folder/my.mex

​​Export all generated files ​-ExportAll ​​Exports all generated files (with source code, and so on). Code is regenerated before export

Includes -ExportSrc and in framework -ExportMEX​

The Argument is expected to be a folder name​.

​​Requires the -HeadlessTool command ​​-HeadlessTool Pins

​-ExportAll C:/exports/generated​

Create a new configuration by importing a toolchain project

​-ImportProject {path}

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

The parameter is a 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 the toolchain project and updates the 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\S32DS.2019\S32DS\S32SDK_S32V23x_EAR_0.8.1

Generate source files with custom copyright ​-Custom

Copyright
File content is inserted as a copyright file header comment into generated source files (.c, .h, .dts, .dtsi), that does not contain copyright Requires the -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 set rules. Requires the -HeadlessTool command -OutputPathOverrides c:\test\outputPathOverrideRules.yaml
​Project link ​-ProjectLink A custom path to the toolchain project folder. It can be used as the absolute path or relative against the saved configuration. Empty sting for default that is not saved in the configuration (since v14). ​ When the command is not used along with the -HeadlessTool command, the -Load command is required. ​​-HeadlessTool Pins

-ProjectLink C:/project

-​​HeadlessTool Pins

-ProjectLink armgcc

-​​HeadlessTool Pins

-ProjectLink ""

-Load C:/conf/conf.mex -ProjectLink armgcc

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

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