Starting from version >= 3.0.0 new CLI system is introduced. With the new system only one flag is used:

  • -c – path to CI configuration file

All options are defined in CI configuration file.

Below is explained every option with possible values for CI configuration file, and some examples how to use it.

CI Configuration file

CI configuration file is split into four main sections:

  • Analysis
  • Project
  • Reports
  • Database

Analysis section has options relevant to running and setting up the type of analysis that needs to be run.


  • type – Analysis type – possible values:
    • 0 – Snapshot analysis
    • 1 – Memory analysis
    • 2 – Project analysis
  • memoryMbAllocation – How much maximum RAM memory in MB should be used by SWART (Note: for some large projects, this value should be 4096 or 6192).
  • taskingUtilityLocation – Path to Tasking Utility tool htdumptc.exe. This is an alternative binary used for gathering some information from .elf file. It should be used only with .elf files created with the Tasking compiler. Optional, if not used, leave it empty.
  • snapshotImageToLoad – Path to Snapshot Image to load and use with Snapshot analysis type. Optional, if not used, leave it empty.
  • active – boolean value, sets if analysis should be used or not. For example: Load a snapshot image and create reports from it, no need for analysis.

Project section has the project’s specific options used for analysis.


  • projectName – name of a project.
  • projectFile – path where a project file is located. (Note: extension of a project file must be .json. For example: DemoProject.json).
  • elfFile – path where .elf file is located.
  • hardwareResourcesFile – path where the Hardware Resources file is located.
  • layoutFile – path where the layout file is located. Optional, if not used, leave it empty.
  • architectureFile – path where the Architecture file is located.
  • temporaryFilesLocation – path to Temporary files location. Folder where SWART holds temporary files created during the analysis phase.
  • logsLocation – path where to store logs.
  • snapshotLocation – path where snapshot image files will be saved when analysis is finished.
  • alwaysAllowAnalysis – boolean value, tells SWART to run analysis even if there are no changes in .elf, Architecture, or Hardware Resources files.

Reports section has options about the type, format, and output location of a reports.


  • active – boolean value, enables reports generation.
  • types – value should be sum of the reports values. Possible reports types:
    • 1 – Fast Hardware Memory
    • 2 – Hardware Memory
    • 4 – Components Memory Budgets
    • 8 – Interfaces
    • 16 – Components Memory Over Budgets
    • 32 – Components Overview
    • 64 – Components Groups Overview
    • 128 – Components Deltas
    • 256 – Memory Deltas
    • 512 – Memory Segment Deltas
  • format – output format for reports. Value should be the sum of the used formats. Possible values for formats:
    • 1 – TXT format
    • 2 – CSV format
  • outLocation – path to a location where reports will be saved.
  • groupsFile – path to Groups file, must be used with the report Components Groups Overview, otherwise, it should be empty.

Database section has options for connecting to the PostgreSQL database used for storing analysis data and deltas.


  • active – boolean value, set to enable database usage.
  • host – ipv4 or ipv6 host address. To use it on local machine, use localhost.
  • port – port number used by PostgreSQL server. Default value used by PostGreSQL 5432.
  • database – database name.
  • dbUser – database user name.
  • dbPassword – database user password.
  • max – max connection to database per SWART application instance.
  • user – SWART application username.


Project Analysis

Use it with the CLI flag -c “<path_to_file>/ci-config.json”

This CI configuration will perform analysis on a project. In the project section, the name and location of the project are defined, as well as the locations of all necessary files needed to perform analysis. If the project does not exist, a new one will be created and saved. AlwaysAllowAnalysis is set, so on every CLI call, analysis will be performed.

Reports that will be generated are: Components Overview, Components Memory Budgets and Hardware Memory (value 38 = 32 + 4 + 2). Both formats are included in the output (value 3 = 2 + 1).

Storing data in a database is enabled. The PostgreSQL server is installed on a localhost machine. Default values are used for database connection parameters.

    "analysis": {
        "type": 2,
        "memoryMbAllocation": 4096,
        "taskingUtilityLocation": "",
        "snapshotImageToLoad": "",
        "active": true
    "project": {
        "projectName": "Example",
        "projectFile": "<some-location>\Example.json",
        "elfFile": "<some-location>\app.elf",
        "hardwareResourcesFile": "<some-location>\hardware-resources.txt",
        "layoutFile": "<some-location>\layout.xml",
        "architectureFile": "<some-location>\architecture.txt",
        "temporaryFilesLocation": "<some-location>\temp",
        "logsLocation": "<some-location>\logs",
        "snapshotLocation": "<some-location>\out",
        "alwaysAllowAnalysis": true
    "reports": {
        "active": true,
        "types": 38,
        "format": 3,
        "outLocation": "<some-location>\out",
        "groupsFile": ""
    "database": {
        "active": true,
        "host": "localhost",
        "port": 5432,
        "database": "swartdatabase",
        "dbUser": "swartuser",
        "dbPassword": "swartpass",
        "max": 20,
        "user": "user.name"
Go to Top